{"id":194,"date":"2025-11-30T03:33:24","date_gmt":"2025-11-30T03:33:24","guid":{"rendered":"https:\/\/seafood.anhtu1.id.vn\/?page_id=194"},"modified":"2025-12-01T07:53:22","modified_gmt":"2025-12-01T07:53:22","slug":"194-2","status":"publish","type":"page","link":"https:\/\/seafood.anhtu1.id.vn\/index.php\/194-2\/","title":{"rendered":"Gi\u1ecf h\u00e0ng"},"content":{"rendered":"\n<style>\n  body {\n    font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n      Roboto, sans-serif;\n  }\n\n  .sf-cart-page {\n    max-width: 1100px;\n    margin: 40px auto;\n    padding: 0 16px 40px;\n  }\n\n  \/* Header gi\u1ecf h\u00e0ng *\/\n  .sf-cart-head {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 20px;\n  }\n  .sf-cart-title-wrap {\n    display: flex;\n    align-items: center;\n    gap: 12px;\n  }\n  .sf-cart-icon {\n    width: 42px;\n    height: 42px;\n    border-radius: 999px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: linear-gradient(135deg, #10b981, #0ea5e9);\n    color: #fff;\n    font-size: 24px;\n  }\n  .sf-cart-title {\n    font-size: 26px;\n    font-weight: 700;\n  }\n  .sf-cart-sub {\n    font-size: 13px;\n    color: #64748b;\n  }\n\n  \/* Khung b\u1ea3ng *\/\n  .sf-cart-box {\n    background: #ffffff;\n    border-radius: 18px;\n    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);\n    overflow: hidden;\n  }\n\n  .sf-cart-table {\n    width: 100%;\n    border-collapse: collapse;\n  }\n\n  .sf-cart-table thead {\n    background: #f8fafc;\n  }\n\n  .sf-cart-table th,\n  .sf-cart-table td {\n    padding: 14px 16px;\n    text-align: left;\n    font-size: 14px;\n    border-bottom: 1px solid #e2e8f0;\n  }\n\n  .sf-cart-table th {\n    font-weight: 600;\n    color: #475569;\n  }\n\n  .sf-cart-row:last-child td {\n    border-bottom: none;\n  }\n\n  .sf-cart-name {\n    font-weight: 600;\n  }\n\n  .sf-cart-price,\n  .sf-cart-subtotal {\n    white-space: nowrap;\n  }\n\n  \/* S\u1ed1 l\u01b0\u1ee3ng *\/\n  .sf-cart-qty {\n    display: inline-flex;\n    align-items: center;\n    border-radius: 999px;\n    border: 1px solid #cbd5f5;\n    overflow: hidden;\n    background: #f8fafc;\n  }\n\n  .sf-cart-qty button {\n    width: 30px;\n    height: 30px;\n    border: none;\n    background: transparent;\n    cursor: pointer;\n    font-size: 18px;\n    line-height: 1;\n  }\n\n  .sf-cart-qty span {\n    width: 36px;\n    text-align: center;\n    font-size: 14px;\n  }\n\n  .sf-cart-remove {\n    color: #ef4444;\n    cursor: pointer;\n    font-size: 13px;\n    font-weight: 600;\n  }\n\n  .sf-cart-remove:hover {\n    text-decoration: underline;\n  }\n\n  \/* Khi gi\u1ecf tr\u1ed1ng *\/\n  .sf-cart-empty {\n    padding: 28px;\n    text-align: center;\n    color: #64748b;\n    font-size: 15px;\n  }\n\n  \/* Footer \u2013 t\u1ed5ng ti\u1ec1n + n\u00fat *\/\n  .sf-cart-footer {\n    padding: 18px 20px;\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    justify-content: space-between;\n    gap: 14px;\n    background: #f8fafc;\n    border-top: 1px solid #e2e8f0;\n  }\n\n  .sf-cart-total-text {\n    font-size: 16px;\n    font-weight: 600;\n    color: #0f172a;\n  }\n\n  .sf-cart-total-text span {\n    font-size: 22px;\n    color: #ef4444;\n  }\n\n  .sf-cart-actions {\n    display: flex;\n    gap: 10px;\n  }\n\n  .sf-btn {\n    padding: 10px 18px;\n    border-radius: 999px;\n    font-size: 14px;\n    font-weight: 600;\n    border: none;\n    cursor: pointer;\n    text-decoration: none;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    white-space: nowrap;\n  }\n\n  .sf-btn-secondary {\n    background: #0f172a;\n    color: #fff;\n  }\n\n  .sf-btn-secondary:hover {\n    background: #020617;\n  }\n\n  .sf-btn-primary {\n    background: #ef4444;\n    color: #fff;\n  }\n\n  .sf-btn-primary:hover {\n    background: #dc2626;\n  }\n\n  \/* Mobile *\/\n  @media (max-width: 768px) {\n    .sf-cart-table thead {\n      display: none;\n    }\n    .sf-cart-table,\n    .sf-cart-table tbody,\n    .sf-cart-row,\n    .sf-cart-row td {\n      display: block;\n      width: 100%;\n    }\n    .sf-cart-row {\n      border-bottom: 1px solid #e2e8f0;\n    }\n    .sf-cart-row td {\n      border-bottom: none;\n      padding: 10px 16px;\n    }\n    .sf-cart-row td:nth-child(1) {\n      padding-top: 14px;\n    }\n    .sf-cart-row td:nth-last-child(1) {\n      padding-bottom: 14px;\n    }\n    .sf-cart-price,\n    .sf-cart-subtotal {\n      font-weight: 600;\n    }\n    .sf-cart-footer {\n      flex-direction: column;\n      align-items: flex-start;\n    }\n  }\n<\/style>\n\n<div class=\"sf-cart-page\">\n  <div class=\"sf-cart-head\">\n    <div class=\"sf-cart-title-wrap\">\n      <div class=\"sf-cart-icon\">\ud83e\udd9e<\/div>\n      <div>\n        <div class=\"sf-cart-title\">Gi\u1ecf h\u00e0ng<\/div>\n        <div class=\"sf-cart-sub\" id=\"sfCartInfo\">\n          \u0110ang t\u1ea3i gi\u1ecf h\u00e0ng&#8230;\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"sf-cart-box\">\n    <table class=\"sf-cart-table\" id=\"cartTable\">\n      <thead>\n        <tr>\n          <th>S\u1ea3n ph\u1ea9m<\/th>\n          <th>\u0110\u01a1n gi\u00e1<\/th>\n          <th>S\u1ed1 l\u01b0\u1ee3ng<\/th>\n          <th>T\u1ea1m t\u00ednh<\/th>\n          <th><\/th>\n        <\/tr>\n      <\/thead>\n      <tbody><\/tbody>\n    <\/table>\n\n    <div class=\"sf-cart-empty\" id=\"emptyCart\" style=\"display: none\">\n      Gi\u1ecf h\u00e0ng c\u1ee7a b\u1ea1n \u0111ang tr\u1ed1ng.<br \/>H\u00e3y th\u00eam v\u00e0i m\u00f3n\n      \ud83e\udd80\ud83e\udd90\ud83e\udd91 t\u01b0\u01a1i ngon n\u00e0o!\n    <\/div>\n\n    <div class=\"sf-cart-footer\">\n      <div class=\"sf-cart-total-text\">\n        T\u1ed5ng ti\u1ec1n: <span id=\"cartTotal\">0 \u0111<\/span>\n      <\/div>\n\n      <div class=\"sf-cart-actions\">\n        <a href=\"https:\/\/seafood.anhtu1.id.vn\" class=\"sf-btn sf-btn-secondary\">Ti\u1ebfp t\u1ee5c mua<\/a>\n        <a href=\"https:\/\/seafood.anhtu1.id.vn\/index.php\/thanh-toan\/\" class=\"sf-btn sf-btn-primary\">Thanh to\u00e1n<\/a>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\n  function formatVND(n) {\n    return n.toLocaleString(\"vi-VN\");\n  }\n\n  function loadCart() {\n    let cart = [];\n    try {\n      cart = JSON.parse(localStorage.getItem(\"cart\")) || [];\n    } catch (e) {}\n\n    const tbody = document.querySelector(\"#cartTable tbody\");\n    const totalEl = document.getElementById(\"cartTotal\");\n    const emptyEl = document.getElementById(\"emptyCart\");\n    const infoEl = document.getElementById(\"sfCartInfo\");\n    tbody.innerHTML = \"\";\n\n    if (cart.length === 0) {\n      document.getElementById(\"cartTable\").style.display = \"none\";\n      emptyEl.style.display = \"block\";\n      totalEl.textContent = \"0 \u0111\";\n      if (infoEl) infoEl.textContent = \"Kh\u00f4ng c\u00f3 s\u1ea3n ph\u1ea9m n\u00e0o trong gi\u1ecf.\";\n      return;\n    }\n\n    document.getElementById(\"cartTable\").style.display = \"table\";\n    emptyEl.style.display = \"none\";\n\n    let total = 0;\n    let totalQty = 0;\n\n    cart.forEach((item, index) => {\n      const sub = item.price * item.qty;\n      total += sub;\n      totalQty += item.qty || 0;\n\n      const tr = document.createElement(\"tr\");\n      tr.className = \"sf-cart-row\";\n      tr.innerHTML = `\n        <td class=\"sf-cart-name\">${item.name}<\/td>\n        <td class=\"sf-cart-price\">${formatVND(item.price)} \u0111<\/td>\n        <td>\n          <div class=\"sf-cart-qty\">\n            <button onclick=\"changeQty(${index}, -1)\">-<\/button>\n            <span>${item.qty}<\/span>\n            <button onclick=\"changeQty(${index}, 1)\">+<\/button>\n          <\/div>\n        <\/td>\n        <td class=\"sf-cart-subtotal\">${formatVND(sub)} \u0111<\/td>\n        <td><span class=\"sf-cart-remove\" onclick=\"removeItem(${index})\">X\u00f3a<\/span><\/td>\n      `;\n      tbody.appendChild(tr);\n    });\n\n    totalEl.textContent = formatVND(total) + \" \u0111\";\n    if (infoEl) {\n      infoEl.textContent = `${totalQty} s\u1ea3n ph\u1ea9m trong gi\u1ecf`;\n    }\n  }\n\n  function changeQty(index, delta) {\n    let cart = JSON.parse(localStorage.getItem(\"cart\")) || [];\n    cart[index].qty += delta;\n    if (cart[index].qty < 1) cart[index].qty = 1;\n    localStorage.setItem(\"cart\", JSON.stringify(cart));\n    loadCart();\n  }\n\n  function removeItem(index) {\n    let cart = JSON.parse(localStorage.getItem(\"cart\")) || [];\n    cart.splice(index, 1);\n    localStorage.setItem(\"cart\", JSON.stringify(cart));\n    loadCart();\n  }\n\n  loadCart();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\ud83e\udd9e Gi\u1ecf h\u00e0ng \u0110ang t\u1ea3i gi\u1ecf h\u00e0ng&#8230; S\u1ea3n ph\u1ea9m \u0110\u01a1n gi\u00e1 S\u1ed1 l\u01b0\u1ee3ng T\u1ea1m t\u00ednh Gi\u1ecf h\u00e0ng c\u1ee7a b\u1ea1n \u0111ang tr\u1ed1ng.H\u00e3y th\u00eam v\u00e0i m\u00f3n \ud83e\udd80\ud83e\udd90\ud83e\udd91 t\u01b0\u01a1i ngon n\u00e0o! T\u1ed5ng ti\u1ec1n: 0 \u0111 Ti\u1ebfp t\u1ee5c mua Thanh to\u00e1n<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-194","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/pages\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":5,"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions"}],"predecessor-version":[{"id":256,"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions\/256"}],"wp:attachment":[{"href":"https:\/\/seafood.anhtu1.id.vn\/index.php\/wp-json\/wp\/v2\/media?parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}