/* ================================================================
   COMPONENTS.CSS — ستار وير | Star Wear
   Shared UI components: product cards, buttons, modals,
   cart drawer, WhatsApp float. Used on ALL pages.
   Load order: 2 of 4
   ================================================================ */

/* ===============================================================
   SW-CARD — Primary Product Card (index, category, search)
   Consistent fixed-ratio image, uniform height, hover effects.
   =============================================================== */
.sw-card {
    background: var(--sw-white);
    border-radius: 14px;
    border: 1px solid var(--sw-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    cursor: pointer;
}
.sw-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* Image container — guaranteed square, images never distort */
.sw-card__img-link { display: block; text-decoration: none; }

.sw-card__img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;       /* 1:1 aspect ratio trick — universal browsers */
    overflow: hidden;
    background: #f7f7f7;
}

.sw-card__img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* crop to fit — no distortion */
    object-position: center top; /* show face/top of clothing */
    display: block;
    transition: transform 0.45s ease;
}
.sw-card:hover .sw-card__img-wrap img {
    transform: scale(1.07);
}

/* Hover overlay with Quick View */
.sw-card__hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sw-card:hover .sw-card__hover-overlay {
    opacity: 1;
    pointer-events: auto;
}

.sw-card__qv-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.95);
    color: var(--sw-black);
    border: none;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--sw-font);
    transform: translateY(10px);
    transition: transform 0.3s ease, background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.sw-card:hover .sw-card__qv-btn {
    transform: translateY(0);
}
.sw-card__qv-btn:hover {
    background: var(--sw-primary);
    color: #fff;
}

/* Card body */
.sw-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.sw-card__cat {
    font-size: 10px;
    font-weight: 700;
    color: var(--sw-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1;
}

.sw-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-black);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    flex: 1;
    transition: color var(--sw-transition);
    min-height: 2.8em; /* reserve space for 2 lines — uniform card heights */
}
.sw-card__name:hover { color: var(--sw-primary); }

.sw-card__price {
    font-size: 15px;
    font-weight: 800;
    color: var(--sw-primary);
    line-height: 1.2;
}

/* Add to cart button */
.sw-card__add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 34px;
    border: 2px solid var(--sw-primary);
    background: transparent;
    color: var(--sw-primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--sw-font);
    margin-top: auto;
}
.sw-card__add:hover,
.sw-card__add.is-added,
.sw-card__add.in-cart {
    background: var(--sw-primary);
    color: #fff;
}

/* Responsive card font sizes */
@media (max-width: 576px) {
    .sw-card__body  { padding: 8px 8px 10px; gap: 4px; }
    .sw-card__name  { font-size: 12px; }
    .sw-card__price { font-size: 13px; }
    .sw-card__add   { font-size: 11px; height: 30px; }
}

/* ── Category horizontal scroll (homepage strip) ─────────────── */
.ebay-horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ebay-horizontal-scroll::-webkit-scrollbar { display: none; }

/* Category circle pills */
.ebay-category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--sw-black);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--sw-transition);
}
.ebay-category-circle:hover { transform: translateY(-3px); }

.ebay-category-circle .img-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--sw-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color var(--sw-transition);
}
.ebay-category-circle:hover .img-wrapper,
.ebay-category-circle.active .img-wrapper {
    border-color: var(--sw-primary);
}
.ebay-category-circle .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ebay-category-circle span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
}

/* ── eBay btn (legacy CTA) ──────────────────────────────────── */
.ebay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--sw-transition);
    font-family: var(--sw-font);
}
.ebay-btn-primary {
    background: var(--sw-primary);
    color: #fff;
    border: 2px solid var(--sw-primary);
}
.ebay-btn-primary:hover {
    background: var(--sw-primary-dk);
    border-color: var(--sw-primary-dk);
}


/* ===============================================================
   BUTTONS
   =============================================================== */
.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    padding: 12px 28px;
    transition: all var(--sw-transition);
    text-decoration: none;
    border: 2px solid transparent;
    font-family: var(--sw-font);
    line-height: 1;
}

.sw-btn-primary {
    background: var(--sw-primary);
    color: #fff;
    border-color: var(--sw-primary);
}
.sw-btn-primary:hover {
    background: var(--sw-primary-dk);
    border-color: var(--sw-primary-dk);
}

.sw-btn-outline {
    background: transparent;
    color: var(--sw-primary);
    border-color: var(--sw-primary);
}
.sw-btn-outline:hover {
    background: var(--sw-primary);
    color: #fff;
}

.sw-btn-whatsapp {
    background: var(--sw-green);
    color: #fff;
    border-color: var(--sw-green);
    width: 100%;
    height: 48px;
    font-size: 16px;
}
.sw-btn-whatsapp:hover {
    background: #1ebe5d;
    border-color: #1ebe5d;
}

.sw-btn-black {
    background: var(--sw-black);
    color: #fff;
    border-color: var(--sw-black);
}
.sw-btn-black:hover {
    background: var(--sw-dark);
    border-color: var(--sw-dark);
}

/* Product action buttons (buy/cart on product.php) */
.btn-buy-now {
    background: var(--sw-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    height: 48px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--sw-transition);
    margin-bottom: 12px;
    font-family: var(--sw-font);
}
.btn-buy-now:hover { background: var(--sw-primary-dk); }

.btn-add-cart {
    background: #fff;
    color: var(--sw-primary);
    border: 2px solid var(--sw-primary);
    border-radius: 50px;
    height: 48px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--sw-transition);
    margin-bottom: 12px;
    font-family: var(--sw-font);
}
.btn-add-cart:hover {
    background: var(--sw-primary);
    color: #fff;
}

/* ===============================================================
   PRODUCT CARDS — unified across index, category, search pages
   =============================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
    .products-grid { gap: 8px; }
}
@media (max-width: 400px) {
    .products-grid { gap: 6px; }
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--sw-gray);
    font-size: 1rem;
}

/* Card container */
.product-card {
    background: var(--sw-white);
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-md);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--sw-transition), transform var(--sw-transition);
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sw-shadow-md);
}

/* Image area */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--sw-light-gray);
}

@supports not (aspect-ratio: 1) {
    .product-image { padding-top: 100%; height: 0; }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.06);
}

/* Multi-image slider within card */
.image-container {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform 0.5s ease;
    direction: ltr;
}
.image-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}
.image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image nav arrows */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: var(--sw-primary);
    border: 1px solid var(--sw-light-gray);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity var(--sw-transition);
    font-size: 12px;
}
.product-image:hover .image-nav { opacity: 1; }
.image-nav.prev { right: 8px; }
.image-nav.next { left: 8px; }
.image-nav:hover { background: var(--sw-primary); color: #fff; }

/* Image dots */
.image-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 3;
}
.image-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--sw-primary);
    cursor: pointer;
    transition: var(--sw-transition);
}
.image-dot.active {
    background: var(--sw-primary);
    transform: scale(1.2);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--sw-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Info section */
.product-info {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 11px;
    color: var(--sw-primary);
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-black);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
    transition: color var(--sw-transition);
}
.product-title:hover { color: var(--sw-primary); }

.product-description {
    display: none;
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--sw-primary);
    margin-bottom: 10px;
}

.product-actions {
    margin-top: auto;
}

/* Add to Cart button (card-level) */
.add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    border: 2px solid var(--sw-primary);
    background: transparent;
    color: var(--sw-primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--sw-transition);
    font-family: var(--sw-font);
}
.add-to-cart:hover,
.add-to-cart.selected {
    background: var(--sw-primary);
    color: #fff;
}

@media (max-width: 576px) {
    .product-info { padding: 8px 8px 10px; }
    .product-title { font-size: 12px; }
    .product-price { font-size: 14px; }
    .add-to-cart   { font-size: 11px; height: 32px; }
}

/* ── Ripple & pulse animations ──────────────────────────────── */
.sw-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    width: 60px; height: 60px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: sw-ripple-anim 0.6s ease forwards;
    pointer-events: none;
}
@keyframes sw-ripple-anim {
    to { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

@keyframes sw-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.sw-cart-pulse { animation: sw-pulse 0.4s ease; }

/* ── Slider-style product cards (homepage) ──────────────────── */
.sw-prod-card {
    flex: 0 0 calc((100% - 64px) / 5);
    min-width: 160px;
    background: var(--sw-white);
    border-radius: var(--sw-radius-md);
    border: 1px solid var(--sw-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--sw-transition), transform var(--sw-transition);
    position: relative;
}
.sw-prod-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.sw-prod-img-link { display: block; text-decoration: none; }

.sw-prod-img {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    background: var(--sw-light-gray);
}
.sw-prod-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.sw-prod-card:hover .sw-prod-img img { transform: scale(1.06); }

.sw-prod-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sw-prod-card:hover .sw-prod-overlay { opacity: 1; }

.sw-qv-btn {
    background: rgba(255,255,255,0.95);
    color: var(--sw-dark);
    border: none;
    border-radius: 50px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background var(--sw-transition), color var(--sw-transition), transform var(--sw-transition);
    transform: translateY(8px);
    font-family: var(--sw-font);
}
.sw-prod-card:hover .sw-qv-btn { transform: translateY(0); }
.sw-qv-btn:hover { background: var(--sw-primary); color: #fff; }

.sw-prod-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sw-prod-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-black);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    transition: color var(--sw-transition);
}
.sw-prod-name:hover { color: var(--sw-primary); }

.sw-prod-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--sw-primary);
    margin-top: 2px;
}

.sw-add-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    border: 2px solid var(--sw-primary);
    background: transparent;
    color: var(--sw-primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--sw-transition);
    position: relative;
    overflow: hidden;
    font-family: var(--sw-font);
}
.sw-add-btn:hover,
.sw-add-btn.in-cart {
    background: var(--sw-primary);
    color: #fff;
}

.sw-no-products {
    text-align: center;
    padding: 40px;
    color: var(--sw-gray);
    font-size: 16px;
    width: 100%;
}

@media (max-width: 1100px) { .sw-prod-card { flex: 0 0 calc((100% - 48px) / 4); } }
@media (max-width: 768px)  { .sw-prod-card { flex: 0 0 calc((100% - 32px) / 3); } }
@media (max-width: 576px)  { .sw-prod-card { flex: 0 0 calc((100% - 16px) / 2); min-width: 140px; } }

/* ── New Arrival Cards (auto-scroll strip) ──────────────────── */
.new-arrival-card {
    min-width: 140px;
    max-width: 140px;
    flex-shrink: 0;
    background: var(--sw-white);
    border-radius: var(--sw-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--sw-shadow);
    direction: rtl;
    text-align: right;
    cursor: pointer;
    transition: transform var(--sw-transition);
}
.new-arrival-card:hover { transform: translateY(-4px); }

.new-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--sw-black);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    z-index: 5;
    text-transform: uppercase;
    border-radius: 2px;
}

.new-arrival-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--sw-light-gray);
    position: relative;
}
.new-arrival-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-arrival-info { padding: 8px; }
.new-arrival-info h3 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.new-arrival-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--sw-primary);
}

/* ===============================================================
   QUANTITY CONTROLS (shared by modals & product page)
   =============================================================== */
.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}
.quantity-label { font-size: 14px; font-weight: 600; }

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: var(--sw-light-gray);
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--sw-transition);
}
.qty-btn:hover { background: var(--sw-border); }

.qty-value {
    min-width: 32px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

/* ===============================================================
   PRODUCT MODAL (Quick View)
   =============================================================== */
.product-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.product-modal.active { display: flex; }

.product-modal-content {
    background: var(--sw-white);
    border-radius: 16px;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.product-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sw-border);
    position: sticky;
    top: 0;
    background: var(--sw-white);
    z-index: 1;
}
.product-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sw-black);
    margin: 0;
}
.close-product-modal {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--sw-gray);
    transition: color var(--sw-transition);
}
.close-product-modal:hover { color: var(--sw-primary); }

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px;
}

.product-modal-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--sw-radius-md);
    background: var(--sw-light-gray);
}

.modal-image-container {
    display: flex;
    transition: transform 0.4s ease;
}
.modal-image-container img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    flex-shrink: 0;
}

.modal-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: var(--sw-shadow);
    z-index: 2;
    transition: background var(--sw-transition), color var(--sw-transition);
}
.modal-image-nav:hover { background: var(--sw-primary); color: #fff; }
.modal-image-nav.prev { right: 8px; }
.modal-image-nav.next { left: 8px; }

.modal-image-indicator {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px;
}
.modal-image-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sw-border);
    cursor: pointer;
    transition: background var(--sw-transition);
}
.modal-image-dot.active { background: var(--sw-primary); }

.product-modal-category {
    display: inline-block;
    background: var(--sw-light-gray);
    color: var(--sw-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.product-modal-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--sw-primary);
    margin: 8px 0;
}

.product-modal-id {
    font-size: 12px;
    color: var(--sw-gray);
    margin-bottom: 12px;
    direction: ltr;
    text-align: left;
}

.product-modal-description {
    color: var(--sw-dark);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 14px;
}

.product-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 700px) {
    .product-modal-body { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .product-modal-content { margin: 8px; }
    .product-modal-body { padding: 16px; }
}

/* ── Quick View Modal (QV) ──────────────────────────────────── */
.qv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.qv-overlay.active { opacity: 1; pointer-events: auto; }

.qv-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    width: min(900px, 96vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
    z-index: 2200;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.qv-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.qv-close {
    position: absolute;
    top: 12px; left: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.08);
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: background var(--sw-transition);
}
.qv-close:hover { background: var(--sw-primary); color: #fff; }

.qv-img-section {
    background: var(--sw-light-gray);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.qv-img-wrap { position: relative; flex: 1; overflow: hidden; }
.qv-img-track {
    display: flex;
    height: 100%;
    min-height: 300px;
    transition: transform 0.4s ease;
}
.qv-img-track img {
    width: 100%; height: 100%;
    object-fit: contain;
    flex-shrink: 0;
    padding: 16px;
}

.qv-img-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: var(--sw-dark);
    cursor: pointer;
    box-shadow: var(--sw-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 2;
    transition: background var(--sw-transition), color var(--sw-transition);
}
.qv-img-nav:hover { background: var(--sw-primary); color: #fff; }
.qv-img-prev { right: 8px; }
.qv-img-next { left: 8px; }

.qv-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    flex-shrink: 0;
}
.qv-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sw-border);
    cursor: pointer;
    transition: background var(--sw-transition), transform var(--sw-transition);
}
.qv-dot.active { background: var(--sw-primary); transform: scale(1.3); }

.qv-details {
    padding: 32px 24px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qv-category {
    font-size: 12px; font-weight: 700;
    color: var(--sw-primary);
    background: rgba(242,101,34,0.1);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    margin-bottom: 4px;
}
.qv-name { font-size: 1.2rem; font-weight: 800; color: var(--sw-black); line-height: 1.4; margin: 0; }
.qv-price { font-size: 1.5rem; font-weight: 900; color: var(--sw-primary); }
.qv-code { font-size: 12px; color: var(--sw-gray); }
.qv-desc { font-size: 14px; color: var(--sw-dark); line-height: 1.7; margin: 4px 0 8px; }

.qv-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 4px 0;
    font-size: 14px;
    font-weight: 600;
}
.qv-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius);
    overflow: hidden;
}
.qv-qty-ctrl button {
    width: 36px; height: 36px;
    border: none;
    background: var(--sw-light-gray);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background var(--sw-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qv-qty-ctrl button:hover { background: var(--sw-border); }
.qv-qty-ctrl span { min-width: 36px; text-align: center; font-size: 15px; font-weight: 700; }

.qv-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.qv-action-btn { width: 100%; height: 46px; font-size: 15px; border-radius: 50px; }
.qv-action-btn.in-cart { background: var(--sw-green) !important; border-color: var(--sw-green) !important; }

.qv-full-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sw-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    transition: opacity var(--sw-transition);
}
.qv-full-link:hover { opacity: 0.75; }

@media (max-width: 700px) {
    .qv-modal {
        grid-template-columns: 1fr;
        grid-template-rows: 280px auto;
        max-height: 95vh;
        top: auto; bottom: 0;
        left: 0; right: 0;
        transform: translateY(20px) scale(0.98);
        border-radius: 20px 20px 0 0;
        width: 100%;
    }
    .qv-modal.active { transform: translateY(0) scale(1); }
    .qv-img-track { min-height: 240px; }
}

/* ── Fullscreen Image Modal ──────────────────────────────────── */
.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}
.image-modal.active { display: flex; }

.image-modal .modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--sw-radius);
}
.close-modal {
    position: absolute;
    top: -40px; right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* ===============================================================
   CART DRAWER
   =============================================================== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.drawer-overlay.active { display: block; opacity: 1; }

.pb-cart-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    max-width: 95vw;
    height: 100%;
    background: var(--sw-white);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pb-cart-drawer.active { left: 0; }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 2px solid var(--sw-primary);
    background: var(--sw-black);
    color: #fff;
    flex-shrink: 0;
}
.drawer-header h3 { font-size: 18px; font-weight: 700; margin: 0; }
.drawer-header button {
    background: none; border: none;
    color: #fff; font-size: 1.6rem;
    cursor: pointer; padding: 0; line-height: 1;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--sw-border);
    flex-shrink: 0;
    background: var(--sw-light-gray);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.total-price { color: var(--sw-primary); font-size: 18px; }

.empty-cart-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--sw-gray);
}
.empty-cart-msg i { font-size: 3rem; color: var(--sw-border); margin-bottom: 12px; display: block; }

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sw-border);
}

.item-img {
    width: 64px; height: 64px;
    border-radius: var(--sw-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--sw-light-gray);
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }

.item-details { flex: 1; min-width: 0; }
.item-details h4 {
    font-size: 13px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-price {
    color: var(--sw-primary);
    font-weight: 700;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

.item-qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}
.item-qty-control button {
    width: 24px; height: 24px;
    border: 1px solid var(--sw-border);
    background: var(--sw-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--sw-transition);
}
.item-qty-control button:hover { background: var(--sw-light-gray); }
.item-qty-control span { width: 28px; text-align: center; font-weight: 600; font-size: 14px; }

.remove-item {
    background: none; border: none;
    color: #aaa; font-size: 18px;
    cursor: pointer; padding: 4px;
    flex-shrink: 0;
    transition: color var(--sw-transition);
}
.remove-item:hover { color: #e00; }

/* ===============================================================
   WHATSAPP FLOATING BUTTON
   =============================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--sw-green);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: all var(--sw-transition);
    font-family: var(--sw-font);
}
.whatsapp-float.show {
    display: flex;
    animation: sw-pop-in 0.3s ease;
}
.whatsapp-float:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.5);
}
.whatsapp-float i { font-size: 20px; }
.whatsapp-float .selected-count {
    background: var(--sw-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    min-width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes sw-pop-in {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

@media (max-width: 600px) {
    .whatsapp-float {
        bottom: 16px; left: 16px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ── Legacy alias — keeps older HTML working ──────────────────*/
.whatsapp-send-container { display: none; }

/* ===============================================================
   INFO / POLICY PAGES
   =============================================================== */
.sw-page-hero {
    background: linear-gradient(135deg, var(--sw-black) 0%, var(--sw-dark) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sw-page-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at center, rgba(242,101,34,0.15) 0%, transparent 60%);
}
.sw-page-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
    position: relative;
}
.sw-page-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    position: relative;
}

.sw-page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.sw-page-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sw-primary);
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sw-light-gray);
}
.sw-page-content p, .sw-page-content li {
    color: var(--sw-dark);
    line-height: 1.8;
    font-size: 15px;
}
.sw-page-content ul { padding-right: 20px; margin: 12px 0; }
.sw-page-content li { margin-bottom: 8px; }

.sw-info-box {
    background: var(--sw-light-gray);
    border-right: 4px solid var(--sw-primary);
    padding: 16px 20px;
    border-radius: 0 var(--sw-radius) var(--sw-radius) 0;
    margin: 20px 0;
}
.sw-info-box p { margin: 0; font-weight: 500; }

/* Access Denied page */
.denied-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.denied-card {
    text-align: center;
    max-width: 500px; width: 100%;
    background: #fff;
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}
.denied-icon {
    font-size: 5rem;
    color: #e03131;
    margin-bottom: 25px;
    opacity: 0.9;
}
.denied-card h1 { font-weight: 800; color: #1a1a1a; margin-bottom: 15px; font-size: 1.8rem; }
.denied-card p  { color: #666; margin-bottom: 35px; font-size: 1.1rem; line-height: 1.6; }
.btn-back {
    display: inline-flex;
    align-items: center; gap: 12px;
    background: #000; color: #fff;
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-family: var(--sw-font);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-back:hover {
    background: #222;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #fff;
}
@media (max-width: 480px) {
    .denied-card { padding: 40px 20px; box-shadow: none; border: none; background: transparent; }
    .denied-icon { font-size: 4rem; }
}

/* Section heading shared */
.ebay-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--sw-black);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.ebay-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 50px; height: 3px;
    background: var(--sw-primary);
    border-radius: 2px;
}

.sw-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}
.sw-slider-controls { display: flex; gap: 8px; flex-shrink: 0; }
.sw-slider-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid var(--sw-border);
    background: var(--sw-white);
    color: var(--sw-dark);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: all var(--sw-transition);
    flex-shrink: 0;
}
.sw-slider-btn:hover { background: var(--sw-primary); border-color: var(--sw-primary); color: #fff; }

@media (max-width: 576px) { .sw-section-header { align-items: center; } }
