
/* ===== assets/css/products-page.css ===== */
/* ===== products.html inline style 1 ===== */
:root{--gold:#e7b100; --black:#111827}
    #site-nav{ position:sticky; top:0; z-index:1000; background:rgba(255,255,255,.82);  border-bottom:1px solid #eee; }

    /* ===== Product card ===== */
    .product-card{position:relative;border:1px solid #eee;border-radius:1rem;overflow:hidden;background:#fff;transition:transform .18s,box-shadow .18s,border-color .18s}
    .product-card:hover{transform:translateY(-4px);box-shadow:0 10px 28px rgba(0,0,0,.10);border-color:var(--gold);background:#fffefb}
    .p-img{width:100%;aspect-ratio:1/1;object-fit:cover;background:#fff}
    .p-body{display:flex;flex-direction:column;gap:.45rem;padding:.85rem .9rem 1rem}
    .p-title{font-weight:800;line-height:1.2;margin-bottom:.15rem;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
    .p-meta{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:22px}
    .price{font-weight:900}
    .old{color:#9ca3af;text-decoration:line-through;margin-inline-start:.5rem;font-weight:600}
    .swatches{display:flex;flex-wrap:wrap;gap:.42rem;min-height:22px}
    .swatch{width:18px;height:18px;border-radius:9999px;border:1px solid #e5e7eb;cursor:pointer;background:#ddd}
    .swatch:focus{outline:2px solid var(--gold);outline-offset:2px}
    .swatch.active{box-shadow:0 0 0 2px #fff inset,0 0 0 2px var(--gold)}
    .add-btn{margin-top:auto;width:100%;border:1px solid #e5e7eb;border-radius:.75rem;padding:.55rem .8rem;font-weight:700}
    .add-btn:hover{border-color:var(--gold);background:#fff8e8}
    .tag-left,.tag-right{position:absolute;top:.55rem;padding:.26rem .5rem;border-radius:.5rem;color:#fff;font-weight:800;font-size:11px;line-height:1;box-shadow:0 2px 6px rgba(0,0,0,.15)}
    .tag-left{left:.55rem;background:#ef4444}
    .tag-right{right:.55rem;background:#16a34a}
    /* NEW: Buy X Get Y badge (below the featured badge) */
    .tag-bxgy{position:absolute;right:.55rem;top:.55rem;padding:.26rem .5rem;border-radius:.5rem;background:#111;color:#fff;font-weight:800;font-size:11px;line-height:1;box-shadow:0 2px 6px rgba(0,0,0,.15)}

    .skel{background:linear-gradient(100deg,#eee 30%,#f6f6f6 40%,#eee 50%) no-repeat;background-size:200% 100%;animation:s 1.2s infinite linear}
    @keyframes s{to{background-position:-200% 0}}

    /* ===== Top controls (buttons) ===== */
    .chip-btn{display:inline-flex;align-items:center;gap:.5rem;border:1px solid #e5e7eb;border-radius:999px;padding:.55rem .9rem;background:#fff}
    .chip-badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.35rem;height:1.35rem;border-radius:999px;background:#111;color:#fff;font-size:.78rem;font-weight:700}

    /* ===== Modal (shared for Filters/Sort) ===== */
    .modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:3000}
    .modal-mask.active{display:block}
    .modal-panel{position:fixed;inset:0;display:none;place-items:center;z-index:3001}
    .modal-panel.active{display:grid}
    .modal-card{width:min(92vw,720px);max-height:88vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.24)}
    .modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #eee}
    .modal-body{padding:16px}
    .modal-foot{padding:12px 16px;border-top:1px solid #eee;display:flex;gap:8px;justify-content:flex-end}
    .field{display:grid;gap:6px;margin-bottom:12px}
    .field label{font-weight:700;font-size:.92rem}
    .field select,.field input{border:1px solid #e5e7eb;border-radius:12px;padding:.6rem .7rem}

    /* ===== Pager ===== */
    .pager a{display:inline-flex;min-width:2.35rem;height:2.35rem;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:.75rem;padding:0 .6rem}
    .pager a.active{background:#111;color:#fff;border-color:#111}

    /* ===== NEW: equal-height cards for perfect button alignment (esp. on phones) ===== */
    #grid{ align-items: stretch; }
    .product-card{ height:100%; display:flex; flex-direction:column; }
    .product-card > .relative{ flex:0 0 auto; }
    .p-body{ flex:1; }


    /* ===== Add to cart choices modal ===== */
    .cart-choice-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:5000}
    .cart-choice-overlay.active{display:block}
    .cart-choice-panel{position:fixed;inset:0;display:none;place-items:end center;z-index:5001;padding:0}
    .cart-choice-panel.active{display:grid}
    @media (min-width:640px){.cart-choice-panel{place-items:center;padding:1rem}}
    .cart-choice-card{width:min(100vw,520px);background:#fff;border-radius:18px 18px 0 0;box-shadow:0 24px 70px rgba(0,0,0,.24);overflow:hidden}
    @media (min-width:640px){.cart-choice-card{border-radius:18px}}
    .cart-choice-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:14px 16px;border-bottom:1px solid #eee}
    .cart-choice-body{padding:16px;display:grid;gap:16px}
    .cart-choice-product{display:grid;grid-template-columns:74px 1fr;gap:12px;align-items:center}
    .cart-choice-img{width:74px;height:74px;border-radius:14px;border:1px solid #eee;object-fit:cover;background:#fff}
    .cart-choice-title{font-weight:900;line-height:1.35}
    .cart-choice-price{font-weight:900;margin-top:3px}
    .cart-choice-label{font-weight:900;margin-bottom:8px}
    .cart-choice-colors,.cart-choice-sizes{display:flex;flex-wrap:wrap;gap:8px}
    .cart-color-chip{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:48px;border:1px solid #e5e7eb;border-radius:14px;padding:8px 7px;background:#fff;cursor:pointer}
    .cart-color-chip.active{border-color:#111827;background:#f9fafb;box-shadow:0 4px 12px rgba(0,0,0,.07)}
    .cart-color-dot{width:28px;height:28px;border-radius:999px;border:2px solid #fff;outline:1px solid #d1d5db;background:#ddd}
    .cart-color-name{font-size:11px;color:#6b7280;max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .cart-size-chip{border:1px solid #e5e7eb;border-radius:12px;padding:8px 12px;font-weight:900;background:#fff;cursor:pointer;min-width:48px;text-align:center}
    .cart-size-chip.active{border-color:#111827;background:#f9fafb;box-shadow:0 4px 12px rgba(0,0,0,.07)}
    .cart-choice-foot{padding:12px 16px;border-top:1px solid #eee;display:flex;gap:8px;justify-content:flex-end;align-items:center}
    .cart-choice-msg{font-size:13px;color:#dc2626;margin-inline-end:auto}

    /* ===== Cart Success Toast ===== */
    .cart-toast{
      position:fixed;
      left:50%;
      bottom:24px;
      transform:translateX(-50%) translateY(120%);
      width:min(420px, calc(100% - 24px));
      background:#111827;
      color:#fff;
      border-radius:18px;
      box-shadow:0 18px 45px rgba(0,0,0,.22);
      padding:14px 16px;
      z-index:999999;
      opacity:0;
      pointer-events:none;
      transition:.32s ease;
      direction:rtl;
    }
    .cart-toast.show{
      transform:translateX(-50%) translateY(0);
      opacity:1;
      pointer-events:auto;
    }
    .cart-toast.en{direction:ltr}
    .cart-toast-content{
      display:flex;
      align-items:center;
      gap:12px;
    }
    .cart-toast-icon{
      width:38px;
      height:38px;
      min-width:38px;
      border-radius:999px;
      background:#16a34a;
      color:#fff;
      display:grid;
      place-items:center;
      font-weight:900;
      font-size:18px;
    }
    .cart-toast-text{
      flex:1;
      min-width:0;
    }
    .cart-toast-title{
      font-size:15px;
      font-weight:900;
      line-height:1.3;
    }
    .cart-toast-message{
      margin-top:2px;
      color:rgba(255,255,255,.78);
      font-size:13px;
      line-height:1.45;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .cart-toast-actions{
      display:flex;
      align-items:center;
      gap:8px;
    }
    .cart-toast-cart-btn{
      background:#fff;
      color:#111827;
      border-radius:999px;
      padding:8px 12px;
      font-size:12px;
      font-weight:900;
      text-decoration:none;
      white-space:nowrap;
    }
    .cart-toast-close{
      width:30px;
      height:30px;
      border:0;
      border-radius:999px;
      background:rgba(255,255,255,.12);
      color:#fff;
      cursor:pointer;
      font-size:18px;
      line-height:1;
      display:grid;
      place-items:center;
    }
    @media (max-width:480px){
      .cart-toast{
        bottom:14px;
        padding:12px;
        border-radius:16px;
      }
      .cart-toast-content{gap:10px}
      .cart-toast-icon{
        width:34px;
        height:34px;
        min-width:34px;
        font-size:16px;
      }
      .cart-toast-title{font-size:14px}
      .cart-toast-message{font-size:12px}
      .cart-toast-cart-btn{
        padding:7px 10px;
        font-size:11px;
      }
    }

/* ===== products.html inline style 2 #chicona-final-card-tune ===== */
/* Final card tune: smaller, softer, square images, badges left/right */
.product-card{display:flex!important;flex-direction:column!important;height:100%!important;min-width:0!important;overflow:hidden!important;border-radius:15px!important;background:#fff!important;font-family:"Tajawal","Cairo",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;box-shadow:0 1px 2px rgba(15,23,42,.025)!important;}
.product-card:hover{transform:translateY(-2px)!important;box-shadow:0 8px 18px rgba(15,23,42,.06)!important;}
.product-card>.relative,.product-card>a:first-of-type,.product-card .product-media,.product-card .p-media,.product-card .media,.product-card .img-wrap{position:relative!important;display:block!important;width:100%!important;aspect-ratio:1/1!important;height:auto!important;min-height:0!important;max-height:none!important;flex:0 0 auto!important;overflow:hidden!important;background:#f8fafc!important;border-radius:0!important;}
.product-card>.relative>a,.product-card>a:first-of-type,.product-card .product-media>a,.product-card .p-media>a,.product-card .img-wrap>a{display:block!important;width:100%!important;height:100%!important;overflow:hidden!important;}
.product-card img.p-img,.product-card .p-img,.product-card .product-img,.product-card .product-image{display:block!important;width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center!important;background:#f8fafc!important;}
.product-card .p-body,.product-card .product-body,.product-card [class*="p-body"]{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;padding:10px!important;gap:6px!important;min-height:138px!important;}
.product-card .p-title,.product-card .product-title,.product-card h3,.product-card .title{display:-webkit-box!important;-webkit-line-clamp:2!important;line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;min-height:2.55em!important;max-height:2.55em!important;margin:0!important;text-align:center!important;font-size:clamp(13.5px,3.45vw,15.5px)!important;line-height:1.28!important;font-weight:650!important;letter-spacing:0!important;color:#111827!important;}
.product-card .swatches,.product-card .product-swatches,.product-card .colors-row{display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:22px!important;height:22px!important;margin:0!important;overflow:hidden!important;}
.product-card .swatch{width:16px!important;height:16px!important;flex:0 0 auto!important;}
.product-card .p-meta,.product-card .product-price,.product-card .price-row{min-height:35px!important;height:35px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;text-align:center!important;}
.product-card .p-meta>div,.product-card .product-price>div,.product-card .price-row>div{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;flex-wrap:wrap!important;}
.product-card .price{display:inline-flex!important;align-items:baseline!important;justify-content:center!important;white-space:nowrap!important;font-size:clamp(15.5px,3.75vw,18px)!important;line-height:1.1!important;font-weight:650!important;color:#111827!important;}
.product-card .old,.product-card .price-old{display:inline-flex!important;align-items:center!important;white-space:nowrap!important;margin:0!important;font-size:clamp(10.5px,2.8vw,12.5px)!important;line-height:1.1!important;font-weight:450!important;color:#9ca3af!important;text-decoration:line-through!important;}
.product-card .add-btn,.product-card .btn-add,.product-card button[data-id],.product-card .product-actions a,.product-card .product-actions button{min-height:35px!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;margin-top:auto!important;white-space:nowrap!important;font-size:clamp(12.8px,3.3vw,14.5px)!important;line-height:1.1!important;font-weight:650!important;border-radius:11px!important;}
.product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge),.product-card :is(.offer-badge[data-type="percent"],.offer-badge[data-type="fixed"],.promo-badge[data-type="percent"],.promo-badge[data-type="fixed"]){position:absolute!important;top:9px!important;left:9px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:12!important;width:auto!important;max-width:calc(50% - 12px)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.25rem .48rem!important;border-radius:999px!important;font-size:9.5px!important;line-height:1!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#111827,#374151)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(15,23,42,.15)!important;direction:inherit!important;}
.product-card .tag-right{position:absolute!important;top:9px!important;right:9px!important;left:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:13!important;max-width:calc(50% - 12px)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.25rem .48rem!important;border-radius:999px!important;font-size:9.5px!important;line-height:1!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#16a34a,#15803d)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(21,128,61,.15)!important;}
@media (max-width:640px){.product-card{border-radius:13px!important}.product-card .p-body,.product-card .product-body,.product-card [class*="p-body"]{min-height:132px!important;padding:9px!important;gap:5px!important}.product-card .p-title,.product-card .product-title,.product-card h3,.product-card .title{font-size:13.5px!important;line-height:1.28!important;min-height:2.55em!important;max-height:2.55em!important}.product-card .p-meta,.product-card .product-price,.product-card .price-row{min-height:33px!important;height:33px!important}.product-card .price{font-size:15.5px!important}.product-card .old,.product-card .price-old{font-size:10.5px!important}.product-card .add-btn,.product-card .btn-add,.product-card button[data-id]{min-height:34px!important;font-size:12.8px!important}.product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){top:8px!important;left:8px!important;padding:.23rem .42rem!important;font-size:9px!important}.product-card .tag-right{top:8px!important;right:8px!important;padding:.23rem .42rem!important;font-size:9px!important}}

/* ===== products.html inline style 3 #chicona-final-compact-fix ===== */
/* Last-loaded compact fix: keeps product images square, smaller home cards, badges split left/right */
.product-card{position:relative!important;display:flex!important;flex-direction:column!important;height:100%!important;overflow:hidden!important;border-radius:14px!important;font-family:"Tajawal","Cairo",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;}
.product-card>.relative,.product-card>a:first-of-type,.product-card .product-media,.product-card .p-media,.product-card .media,.product-card .img-wrap{position:relative!important;display:block!important;width:100%!important;aspect-ratio:1/1!important;height:auto!important;overflow:hidden!important;background:#fafafa!important;}
.product-card>.relative>a,.product-card>a:first-of-type,.product-card .product-media>a,.product-card .p-media>a,.product-card .img-wrap>a{display:block!important;width:100%!important;height:100%!important;}
.product-card img.p-img,.product-card .p-img,.product-card .product-img,.product-card .product-image{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;object-position:center!important;background:#fafafa!important;}
.product-card .p-body,.product-card .product-body,.product-card [class*="p-body"]{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;padding:8px!important;gap:5px!important;min-height:118px!important;}
.product-card .p-title,.product-card .product-title,.product-card h3,.product-card .title{font-size:clamp(12.2px,3.15vw,14px)!important;line-height:1.28!important;font-weight:550!important;min-height:2.55em!important;max-height:2.55em!important;display:-webkit-box!important;-webkit-line-clamp:2!important;line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;text-align:center!important;margin:0!important;color:#111827!important;letter-spacing:0!important;}
.product-card .swatches,.product-card .product-swatches,.product-card .colors-row{min-height:20px!important;height:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;margin:0!important;overflow:hidden!important;}
.product-card .swatch{width:14px!important;height:14px!important;}
.product-card .p-meta,.product-card .product-price,.product-card .price-row{min-height:30px!important;height:30px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;margin:0!important;}
.product-card .p-meta>div,.product-card .product-price>div,.product-card .price-row>div{display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;flex-wrap:wrap!important;width:100%!important;}
.product-card .price{font-size:clamp(14px,3.35vw,16px)!important;line-height:1.1!important;font-weight:600!important;white-space:nowrap!important;color:#111827!important;}
.product-card .old,.product-card .price-old{font-size:clamp(9.5px,2.45vw,11.5px)!important;line-height:1.1!important;font-weight:400!important;white-space:nowrap!important;color:#9ca3af!important;text-decoration:line-through!important;margin:0!important;}
.product-card .add-btn,.product-card .btn-add,.product-card button[data-id],.product-card .product-actions a,.product-card .product-actions button,.product-card .view-btn{min-height:32px!important;font-size:clamp(11.8px,3vw,13px)!important;font-weight:550!important;border-radius:10px!important;margin-top:auto!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;}
.product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){position:absolute!important;top:8px!important;left:8px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:12!important;max-width:calc(50% - 12px)!important;width:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.22rem .42rem!important;border-radius:999px!important;font-size:8.8px!important;line-height:1!important;font-weight:600!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#111827,#374151)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(15,23,42,.15)!important;}
.product-card .tag-right{position:absolute!important;top:8px!important;right:8px!important;left:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:13!important;max-width:calc(50% - 12px)!important;width:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.22rem .42rem!important;border-radius:999px!important;font-size:8.8px!important;line-height:1!important;font-weight:600!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#16a34a,#15803d)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(21,128,61,.15)!important;}
#specialRow .product-card{flex:0 0 clamp(145px,42vw,185px)!important;max-width:clamp(145px,42vw,185px)!important;}
@media (min-width:768px){#specialRow .product-card{flex-basis:clamp(165px,20vw,200px)!important;max-width:clamp(165px,20vw,200px)!important;}}
@media (max-width:640px){.product-card .p-body,.product-card .product-body,.product-card [class*="p-body"]{min-height:114px!important;padding:7px!important;gap:4px!important}.product-card .p-title,.product-card .product-title,.product-card h3,.product-card .title{font-size:12.2px!important}.product-card .price{font-size:14.2px!important}.product-card .old,.product-card .price-old{font-size:9.5px!important}.product-card .add-btn,.product-card .btn-add,.product-card button[data-id],.product-card .view-btn{min-height:31px!important;font-size:11.8px!important}.product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){top:7px!important;left:7px!important;font-size:8.3px!important;padding:.2rem .36rem!important}.product-card .tag-right{top:7px!important;right:7px!important;font-size:8.3px!important;padding:.2rem .36rem!important}}



/* ===== assets/css/product-card-unified.css ===== */
/* Chicona unified product cards — keep product cards consistent across all UI pages */
:root{
  --pc-card-bg:#ffffff;
  --pc-card-border:#eeeeee;
  --pc-text:#111827;
  --pc-muted:#9ca3af;
  --pc-gold:#C89B3C;
  --pc-feature:#16a34a;
}

body .product-card{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid var(--pc-card-border)!important;
  border-radius:1rem!important;
  background:var(--pc-card-bg)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035)!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease!important;
  font-family:"Tajawal","Cairo",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
}
body .product-card:hover{
  transform:translateY(-3px)!important;
  box-shadow:0 12px 28px rgba(15,23,42,.10)!important;
  border-color:var(--pc-gold)!important;
  background:#fffefb!important;
}

/* Product media: one square image area everywhere */
body .product-card > .relative,
body .product-card > a:first-of-type,
body .product-card .product-media,
body .product-card .p-media,
body .product-card .media,
body .product-card .img-wrap{
  position:relative!important;
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  aspect-ratio:1/1!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:hidden!important;
  background:#fafafa!important;
  border-radius:0!important;
}
body .product-card > .relative > a,
body .product-card > a:first-of-type,
body .product-card .product-media > a,
body .product-card .p-media > a,
body .product-card .img-wrap > a{
  display:block!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
}
body .product-card img.p-img,
body .product-card .p-img,
body .product-card img.product-img,
body .product-card .product-image{
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  object-fit:cover!important;
  object-position:center!important;
  background:#fafafa!important;
}

/* Product body layout */
body .product-card .p-body,
body .product-card .product-body,
body .product-card [class*="p-body"]{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  padding:10px!important;
  gap:6px!important;
  min-height:132px!important;
}
body .product-card .p-title,
body .product-card .product-title,
body .product-card h3,
body .product-card .title{
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  min-height:2.55em!important;
  max-height:2.55em!important;
  margin:0!important;
  text-align:center!important;
  font-size:clamp(13px,3.25vw,15px)!important;
  line-height:1.28!important;
  font-weight:600!important;
  letter-spacing:0!important;
  color:var(--pc-text)!important;
}
body .product-card .swatches,
body .product-card .product-swatches,
body .product-card .colors-row{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:20px!important;
  height:20px!important;
  margin:0!important;
  overflow:hidden!important;
}
body .product-card .swatch{
  width:14px!important;
  height:14px!important;
  flex:0 0 auto!important;
}
body .product-card .p-meta,
body .product-card .product-price,
body .product-card .price-row{
  min-height:30px!important;
  height:30px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  text-align:center!important;
}
body .product-card .p-meta > div,
body .product-card .product-price > div,
body .product-card .price-row > div{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  flex-wrap:wrap!important;
}
body .product-card .price{
  display:inline-flex!important;
  align-items:baseline!important;
  justify-content:center!important;
  gap:4px!important;
  flex-wrap:wrap!important;
  white-space:nowrap!important;
  font-size:clamp(14.5px,3.45vw,16.5px)!important;
  line-height:1.1!important;
  font-weight:650!important;
  color:var(--pc-text)!important;
}
body .product-card .old,
body .product-card .price-old{
  display:inline-flex!important;
  align-items:center!important;
  white-space:nowrap!important;
  margin:0!important;
  margin-inline-start:4px!important;
  font-size:clamp(10px,2.5vw,12px)!important;
  line-height:1.1!important;
  font-weight:450!important;
  color:var(--pc-muted)!important;
  text-decoration:line-through!important;
}
body .product-card .add-btn,
body .product-card .btn-add,
body .product-card button[data-id],
body .product-card .product-actions a,
body .product-card .product-actions button,
body .product-card .view-btn{
  min-height:34px!important;
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  margin-top:auto!important;
  padding:.48rem .65rem!important;
  white-space:nowrap!important;
  font-size:clamp(12.2px,3.1vw,13.8px)!important;
  line-height:1.1!important;
  font-weight:600!important;
  border-radius:.75rem!important;
  border:1px solid #e5e7eb!important;
  background:#fff!important;
  color:var(--pc-text)!important;
}
body .product-card .add-btn:hover,
body .product-card .btn-add:hover,
body .product-card button[data-id]:hover,
body .product-card .view-btn:hover{
  border-color:var(--pc-gold)!important;
  background:#fff8e8!important;
}

/* Badges: offer/discount left, featured right. Never stack on top of each other. */
body .product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){
  position:absolute!important;
  top:9px!important;
  left:9px!important;
  right:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  z-index:12!important;
  width:auto!important;
  max-width:calc(50% - 12px)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:.25rem .48rem!important;
  border-radius:999px!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:650!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  background:linear-gradient(135deg,#111827,#374151)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.35)!important;
  box-shadow:0 5px 14px rgba(15,23,42,.15)!important;
  direction:inherit!important;
}
body .product-card .tag-right{
  position:absolute!important;
  top:9px!important;
  right:9px!important;
  left:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  z-index:13!important;
  max-width:calc(50% - 12px)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:.25rem .48rem!important;
  border-radius:999px!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:650!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  background:linear-gradient(135deg,#16a34a,#15803d)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.35)!important;
  box-shadow:0 5px 14px rgba(21,128,61,.15)!important;
}
body .product-card:has(.tag-bxgy) .tag-left,
body .product-card:has(.tag-right-bxgy) .tag-left{
  display:none!important;
}

/* Home horizontal product row: same card design, controlled width */
body #specialRow .product-card{
  flex:0 0 clamp(165px,42vw,205px)!important;
  max-width:clamp(165px,42vw,205px)!important;
}
@media (min-width:768px){
  body #specialRow .product-card{
    flex-basis:clamp(185px,22vw,225px)!important;
    max-width:clamp(185px,22vw,225px)!important;
  }
}

@media (max-width:640px){
  body .product-card{border-radius:13px!important;}
  body .product-card .p-body,
  body .product-card .product-body,
  body .product-card [class*="p-body"]{min-height:126px!important;padding:9px!important;gap:5px!important;}
  body .product-card .p-title,
  body .product-card .product-title,
  body .product-card h3,
  body .product-card .title{font-size:12.8px!important;line-height:1.28!important;}
  body .product-card .price{font-size:14.8px!important;}
  body .product-card .old,
  body .product-card .price-old{font-size:10px!important;}
  body .product-card .add-btn,
  body .product-card .btn-add,
  body .product-card button[data-id],
  body .product-card .view-btn{min-height:32px!important;font-size:12px!important;}
  body .product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){top:8px!important;left:8px!important;padding:.22rem .40rem!important;font-size:8.6px!important;}
  body .product-card .tag-right{top:8px!important;right:8px!important;padding:.22rem .40rem!important;font-size:8.6px!important;}
}

/* Phase 7 v2 hard unification: this is the only visual contract for product cards */
html body .product-card{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid #eee!important;
  border-radius:1rem!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035)!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease!important;
  font-family:"Tajawal","Cairo",system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
}
html body .product-card:hover{transform:translateY(-3px)!important;box-shadow:0 12px 28px rgba(15,23,42,.10)!important;border-color:var(--gold,#C89B3C)!important;background:#fffefb!important;}
html body .product-card > .relative{position:relative!important;display:block!important;width:100%!important;aspect-ratio:1/1!important;height:auto!important;overflow:hidden!important;background:#fafafa!important;flex:0 0 auto!important;border-radius:0!important;}
html body .product-card > .relative > a{display:block!important;width:100%!important;height:100%!important;overflow:hidden!important;}
html body .product-card img.p-img{display:block!important;width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:center!important;background:#fafafa!important;}
html body .product-card .p-body{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;padding:10px!important;gap:6px!important;min-height:132px!important;}
html body .product-card .p-title{display:-webkit-box!important;-webkit-line-clamp:2!important;line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;min-height:2.55em!important;max-height:2.55em!important;margin:0!important;text-align:center!important;font-size:clamp(13px,3.25vw,15px)!important;line-height:1.28!important;font-weight:600!important;letter-spacing:0!important;color:#111827!important;text-decoration:none!important;}
html body .product-card .swatches{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-height:20px!important;height:20px!important;margin:0!important;overflow:hidden!important;}
html body .product-card .swatch{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;flex:0 0 auto!important;border-radius:999px!important;}
html body .product-card .p-meta{min-height:30px!important;height:30px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;text-align:center!important;}
html body .product-card .p-meta > div{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;flex-wrap:wrap!important;}
html body .product-card .price{display:inline-flex!important;align-items:baseline!important;justify-content:center!important;white-space:nowrap!important;font-size:clamp(14.5px,3.45vw,16.5px)!important;line-height:1.1!important;font-weight:650!important;color:#111827!important;}
html body .product-card .old{display:inline-flex!important;align-items:center!important;white-space:nowrap!important;margin:0!important;margin-inline-start:4px!important;font-size:clamp(10px,2.5vw,12px)!important;line-height:1.1!important;font-weight:450!important;color:#9ca3af!important;text-decoration:line-through!important;}
html body .product-card .add-btn{min-height:34px!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;margin-top:auto!important;padding:.48rem .65rem!important;white-space:nowrap!important;font-size:clamp(12.2px,3.1vw,13.8px)!important;line-height:1.1!important;font-weight:600!important;border-radius:.75rem!important;border:1px solid #e5e7eb!important;background:#fff!important;color:#111827!important;}
html body .product-card .add-btn:hover{border-color:var(--gold,#C89B3C)!important;background:#fff8e8!important;}
html body .product-card .product-card-main-badge,
html body .product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){position:absolute!important;top:9px!important;left:9px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:12!important;width:auto!important;max-width:calc(50% - 12px)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.25rem .48rem!important;border-radius:999px!important;font-size:9.5px!important;line-height:1!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#111827,#374151)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(15,23,42,.15)!important;}
html body .product-card .product-card-featured-badge,
html body .product-card .tag-right{position:absolute!important;top:9px!important;right:9px!important;left:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;z-index:13!important;width:auto!important;max-width:calc(50% - 12px)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:.25rem .48rem!important;border-radius:999px!important;font-size:9.5px!important;line-height:1!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:linear-gradient(135deg,#16a34a,#15803d)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:0 5px 14px rgba(21,128,61,.15)!important;}
html body .product-card:has(.tag-bxgy) .tag-left{display:none!important;}
html body .grid-prods{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem!important;}
@media (min-width:768px){html body .grid-prods{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.5rem!important;}}
@media (min-width:1024px){html body .grid-prods{grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
html body #specialRow .product-card{flex:0 0 clamp(165px,42vw,205px)!important;max-width:clamp(165px,42vw,205px)!important;}
@media (min-width:768px){html body #specialRow .product-card{flex-basis:clamp(185px,22vw,225px)!important;max-width:clamp(185px,22vw,225px)!important;}}
@media (max-width:640px){
  html body .product-card{border-radius:13px!important;}
  html body .product-card .p-body{min-height:126px!important;padding:9px!important;gap:5px!important;}
  html body .product-card .p-title{font-size:12.8px!important;line-height:1.28!important;}
  html body .product-card .price{font-size:14.8px!important;}
  html body .product-card .old{font-size:10px!important;}
  html body .product-card .add-btn{min-height:32px!important;font-size:12px!important;}
  html body .product-card .product-card-main-badge,
  html body .product-card :is(.tag-left,.tag-bxgy,.tag-right-bxgy,.offer-badge,.promo-badge){top:8px!important;left:8px!important;padding:.22rem .40rem!important;font-size:8.6px!important;}
  html body .product-card .product-card-featured-badge,
  html body .product-card .tag-right{top:8px!important;right:8px!important;padding:.22rem .40rem!important;font-size:8.6px!important;}
}

/* Phase 7 v4: single swatch contract used by ProductCard.render() directly.
   Old per-page hydrators no longer target these swatches, so the look stays identical. */
html body .product-card .pc-swatches{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:20px!important;
  height:20px!important;
  margin:0!important;
  overflow:hidden!important;
}
html body .product-card .pc-swatches.no-swatches{
  visibility:hidden!important;
}
html body .product-card .pc-swatch,
html body .product-card .swatch.pc-swatch{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  min-height:14px!important;
  flex:0 0 auto!important;
  border-radius:999px!important;
  border:1px solid rgba(17,24,39,.18)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.9) inset!important;
  background-color:#e5e7eb;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  cursor:pointer!important;
  padding:0!important;
  outline:none!important;
}
html body .product-card .pc-swatch.active,
html body .product-card .swatch.pc-swatch.active{
  border-color:var(--gold,#C89B3C)!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.95) inset,0 0 0 1.5px var(--gold,#C89B3C)!important;
}
@media (max-width:640px){
  html body .product-card .pc-swatch,
  html body .product-card .swatch.pc-swatch{
    width:13px!important;
    height:13px!important;
    min-width:13px!important;
    min-height:13px!important;
  }
}

