/* ============================
   Sun.sa Inspired Redesign
   ============================ */

:root {
    --header-bg: #344b47;
    /* Dark olive/green matching sun.sa */
    --header-gold: #fff19e;
    /* Gold accent color */
    --header-gold-hover: #e0c88a;
    --primary-color: #344b47;
    --secondary-color: #f8f9fa;
    --accent-color: #fff19e;
    --text-color: #333;
    --light-text: #777;
    --border-color: #eee;
}

/* Typography */
body {
    background-color: #f8f5f2;
    color: var(--text-color);
}

/* ===== CRITICAL: Hide old main.css .header-nav on desktop ===== */
.sun-header .header-nav {
    display: none !important;
}

@media (max-width: 767px) {
    .sun-header .header-nav {
        display: block !important;
        position: fixed;
        top: 0;
        inset-inline-start: -300px;
        height: 100dvh;
        width: 300px;
        background-color: #fff;
        z-index: 99;
        transition: all 0.3s ease-in-out;
    }

    .sun-header .header-nav.active {
        inset-inline-start: 0;
    }
}

/* ============================
   HEADER - Unified Dark Block
   ============================ */
.sun-header {
    background: var(--header-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 100;
}

/* --- Top Row: Region + Language --- */
.header-top-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    font-size: 13px;
}

/* Region Dropdown */
.header-region-dropdown {
    position: relative;
}

.region-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--header-gold) !important;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}

.region-trigger:hover {
    color: var(--header-gold-hover) !important;
}

.region-trigger i.fa-map-marker-alt {
    font-size: 14px;
}

.region-label {
    color: rgba(255, 255, 255, 0.7);
}

.region-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

.region-current {
    color: var(--header-gold);
    font-weight: 600;
}

.region-arrow {
    font-size: 10px;
    margin-inline-start: 3px;
    transition: transform 0.3s;
}

.header-region-dropdown:hover .region-arrow {
    transform: rotate(180deg);
}

.region-dropdown-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    width: 280px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 200;
    max-height: 360px;
    overflow-y: auto;
}

.region-search {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 8px 12px;
    border-bottom: 1px solid #f0efe9;
    z-index: 1;
}

.region-search-input {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e6e3db;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}

.region-search-input:focus {
    border-color: #d7ceb9;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.header-region-dropdown:hover .region-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.header-region-dropdown.open .region-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.region-option {
    display: block;
    padding: 10px 18px;
    color: #333 !important;
    font-size: 14px;
    transition: 0.2s;
    white-space: nowrap;
}

.region-option:hover,
.region-option.active {
    background: #f5f2ed;
    color: var(--primary-color) !important;
}

.region-option.active {
    font-weight: 600;
}

.lang-switch-link {
    color: var(--header-gold) !important;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.lang-switch-link:hover {
    color: var(--header-gold-hover) !important;
}

/* --- Main Row: Logo + Search + Actions --- */
.header-main-row {
    padding: 15px 0;
}

.header-main-row .container {
    gap: 30px;
}

/* Logo */
.header-logo img {
    height: 65px;
    max-height: 65px;
    filter: brightness(1.1);
    transition: transform 0.3s;
}

.header-logo:hover img {
    transform: scale(1.05);
}

/* Search Bar (sun.sa style: icon on start side, white bg, rounded) */
.header-search {
    flex: 1;
    max-width: 800px;
    position: relative;
}

.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-input {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 25px;
    padding-inline-start: 50px;
    padding-inline-end: 20px;
    background: #fff;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    outline: none;
    transition: box-shadow 0.3s;
}

.header-search-input::placeholder {
    color: #999;
    font-size: 13px;
}

.header-search-input:focus {
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.3);
}

.header-search-icon {
    position: absolute;
    inset-inline-start: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color 0.3s;
}

.header-search-icon:hover {
    color: var(--header-bg);
}

@media (max-width: 767px) {
    .header-search-form {
        margin: 0 20px;
    }
}

/* User Actions */
.header-user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Account Dropdown */
.header-account-dropdown {
    position: relative;
}

.header-account-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--header-gold) !important;
    font-size: 13px;
    /*font-weight: 500;*/
    cursor: pointer;
    white-space: nowrap;
    padding: 6px 0;
}

.header-account-trigger i {
    font-size: 20px;
    color: var(--header-gold);
}

.header-account-trigger:hover {
    color: var(--header-gold-hover) !important;
}

.header-account-trigger:hover i {
    color: var(--header-gold-hover);
}

.header-account-menu {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    min-width: 150px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 200;
}

.header-account-dropdown:hover .header-account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.header-account-menu a {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    color: #333 !important;
    font-size: 14px;
    transition: 0.2s;
    white-space: nowrap;
}

.header-account-menu a:hover {
    background: #f5f2ed;
    color: var(--primary-color) !important;
}

.header-account-menu .dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.header-account-menu .logout-item {
    color: #e53935 !important;
}

.header-account-menu .logout-item:hover {
    background: #fef0f0;
}

/* Cart Link */
.header-cart-link {
    position: relative;
    color: var(--header-gold) !important;
    transition: 0.2s;
}

.header-cart-link:hover {
    color: var(--header-gold-hover) !important;
}

.header-cart-link:hover .cart-icon-circle {
    border-color: var(--header-gold-hover);
    background: rgba(201, 169, 110, 0.1);
}

/* Cart Circle Border */
.cart-icon-circle {
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--header-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.header-cart-badge {
    position: absolute;
    top: -5px;
    inset-inline-start: -5px;
    background: var(--header-gold);
    color: var(--header-bg);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* Mobile Toggle */
.header-mobile-toggle {
    color: var(--header-gold) !important;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ============================
   NAVIGATION BAR
   ============================ */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 16px 0;
}

.nav-link-item {
    color: #333;
    /*font-weight: 600;*/
    /*font-size: 15px;*/
    position: relative;
    padding: 5px 0;
    transition: 0.3s;
}

.nav-link-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: 0.3s;
}

.nav-link-item:hover,
.nav-link-item.active {
    color: var(--primary-color);
}

.nav-link-item:hover::after,
.nav-link-item.active::after {
    width: 100%;
}

/* ============================
   MOBILE NAV
   ============================ */
.mobile-auth-links {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.mobile-auth-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-auth-btn.second {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.mobile-logout {
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.mobile-logout-btn {
    color: #e53935;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ============================
   FOOTER
   ============================ */
.sun-footer {
    background-color: #fff;
    padding: 70px 0 20px;
    border-top: 1px solid #eee;
    margin-top: 60px;
    font-size: 14px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 25px;
    color: #fff29d;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #666;
    transition: 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.app-links img {
    height: 40px;
    margin-bottom: 10px;
}

.copyright-bar {
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 50px;
    text-align: center;
    color: #999;
}

/* ============================
   HOME PAGE
   ============================ */
.sun-hero-section {
    padding: 40px;
}

.sun-hero-slider .swiper-slide img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    filter: brightness(0.95);
}

.section-head {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-head .section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-heads .section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-head .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.section-heads .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* Banners */
.sun-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sun-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.sun-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.sun-banner:hover img {
    transform: scale(1.03);
}

/* Category Grid */
.category-grid-item {
    text-align: center;
    padding: 25px 15px;
    border-radius: 12px;
    transition: 0.3s;
    background: #fff;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-grid-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    transform: translateY(-5px);
}

.category-grid-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.category-grid-item:hover img {
    transform: scale(1.1);
}

.category-grid-item h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Product Card (sun.sa match) */
.sun-product-card {
    border: none;
    /* Removed border */
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 0;
}

.sun-product-card:hover {
    /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); */
    transform: translateY(-5px);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* Square image */
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 25px;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.sun-product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

/* Wishlist Heart Icon (Top-Left) */
.product-fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    /* Physical left */
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}

.product-fav-btn:hover {
    background: #fef0f0;
    color: #e53935;
    transform: scale(1.1);
}

.product-fav-btn.active {
    color: #e53935;
}

/* Discount Badge */
.product-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    /* Right side */
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Product Info */
.product-info {
    padding: 10px 15px;
    text-align: center;
    /* Centered text */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.product-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary-color);
}

/* Price */
.product-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.currency-symbol {
    font-size: 0.75em;
    font-weight: 500;
}

.old-price {
    text-decoration: line-through;
    color: #bbb;
    font-size: 13px;
    font-weight: 400;
}

/* Add to Cart Button (Full Width) */
.product-add-cart-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 25px;
    /* Rounded bottom corners matched card */
    margin-top: 15px;
}

.product-add-cart-btn:hover {
    background: #2c3a35;
    /* Darker shade */
}

.product-add-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Brands */
.sun-brand-item {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: #fff;
    transition: 0.3s;
}

.sun-brand-item img {
    max-width: 100%;
    max-height: 80px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: 0.3s;
}

.sun-brand-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sun-brand-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 991px) {
    .sun-hero-slider .swiper-slide img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .header-user-actions {
        gap: 15px;
    }

    .header-search-input {
        padding-inline-end: 45px;
    }

    .header-main-row .container {
        gap: 15px;
    }

    .header-logo img {
        height: 50px;
        max-height: 50px;
    }
}

@media (max-width: 767px) {
    .header-top-row {
        display: none;
    }

    .header-main-row {
        padding: 10px 0;
    }

    .header-search {
        max-width: none;
        flex: 1;
    }

    .header-search-input {
        height: 42px;
        font-size: 13px;
    }

    .header-account-dropdown span {
        display: none;
    }

    .header-logo img {
        height: 45px;
        max-height: 45px;
    }
}

@media (max-width: 576px) {
    .sun-hero-slider .swiper-slide img {
        /*height: 250px;*/
        display: block;
        max-width: 100%;
        height: auto;
    }

    .section-head .section-title {
        font-size: 20px;
    }
}

/* ============================
   FOOTER REDESIGN
   ============================ */
.sun-footer {
    background-color: #2c3e3a;
    /* Dark green matching sun.sa */
    color: #fff;
    padding-top: 50px;
    padding-bottom: 20px;
    font-size: 14px;
}

.footer-primary-content {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 30px;
}

.footer-title {
    color: var(--header-gold);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    text-align: inherit;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    text-transform: capitalize;
    color: #fff29d;
    font-weight: 300;
    transition: color ease-in-out 0.2s;
    line-height: normal;
}

.footer-links a:hover {
    color: var(--header-gold) !important;
    padding-inline-start: 5px;
}

.newsletter-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 14px;
}

.newsletter-input-group {
    display: flex;
    background: #fff;
    border-radius: 30px;
    padding: 5px;
    max-width: 350px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .newsletter-input-group {
        margin: 0;
    }
}

.newsletter-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    color: #333;
}

.newsletter-btn {
    background: #fff;
    color: #2c3e3a;
    border: 1px solid #eee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.newsletter-btn:hover {
    background: #f8f8f8;
    transform: scale(1.05);
}

.social-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 16px;
    transition: 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--header-gold);
    color: #2c3e3a !important;
    transform: translateY(-3px);
}

.apps-title {
    color: var(--header-gold);
    font-size: 16px;
    /*font-weight: 600;*/
}

.app-badge img {
    height: 28px;
    transition: 0.3s;
}

.app-badge:hover img {
    transform: translateY(-3px);
}

.footer-legal p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-bottom-bar {
    border-top-color: rgba(255, 255, 255, 0.05) !important;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.tasawk {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

@media (max-width: 767px) {
    .tasawk {
        justify-content: center;
    }
}

.payment-icons img {
    filter: grayscale(1) brightness(10) invert(1);
    opacity: 0.7;
    transition: 0.3s;
}

.payment-icons:hover img {
    filter: none;
    opacity: 1;
}

/* ============================
   GRID LAYOUT OPTIMIZATION (Site-wide)
   Force 4 items per row on desktop for all product grids in listing pages
   ============================ */
@media (min-width: 992px) {
    .page-content .products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        display: grid !important;
        gap: 25px !important;
    }
}

@media (max-width: 991px) and (min-width: 576px) {
    .page-content .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 575px) {
    .page-content .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* ============================
   CART PAGE REDESIGN (Refined)
   ============================ */

.sun-cart-pagination {
    bottom: -20px !important;
    position: relative !important;
}

/* --- Breadcrumb --- */
.breadcrumb-section {
    padding: 15px 0;
}

.breadcrumb-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    font-size: 14px;
    color: #999;
}

.breadcrumb-item::after {
    content: '/';
    margin-inline-start: 8px;
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-link {
    color: #999;
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

/* --- Promo Progress Banner --- */
.sun-cart-promo-banner {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    border: 1px solid #eee;
}

.promo-banner-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.promo-banner-text {
    font-size: 16px;
    color: #444;
    margin-bottom: 15px;
    display: block;
}

.promo-progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.promo-progress-fill {
    height: 100%;
    background: #ffcc00;
    /* Yellow bar from reference */
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* --- Cart Items --- */
.sun-cart-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    text-align: start;
}

.sun-cart-items-section {
    margin-bottom: 50px;
}

.cart-products {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cart-product {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1.5px solid #f2f2f2;
    gap: 20px;
}

.cart_product-img {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: #eee;
    border-radius: 12px;
    overflow: hidden;
}

.cart_product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* object-fit: cover; */
}

.cart_product-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart_product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    max-width: 300px;
}

.cart_product-title a {
    color: inherit;
    text-decoration: none;
}

.cart_product-tools {
    display: flex;
    align-items: center;
    gap: 40px;
}

.cart_product-quantity {
    display: flex;
    align-items: center;
    /* border: 1.5px solid #eee; */
    border-radius: 8px;
    padding: 2px 0;
}

.quantity-btn {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart_product-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    min-width: 120px;
    text-align: end;
}

.cart_product-del {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    transition: color 0.2s;
}

.cart_product-del:hover {
    color: #e53935;
}

/* Hide old total in items list */
.cart-final_total {
    display: none;
}

/* --- Suggested Products --- */

.sun-cart-layout {
    height: fit-content;
}

.sun-cart-suggested-section {
    margin-bottom: 60px;
}

.sun-cart-tabs {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sun-cart-tab {
    background: transparent;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    color: #999;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.sun-cart-tab.active {
    color: #333;
    font-weight: 700;
}

.sun-cart-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #2c3e3a;
}

.sun-cart-swiper {
    padding-bottom: 20px !important;
    overflow: hidden !important;
}

.sun-cart-swiper-next,
.sun-cart-swiper-prev {
    color: #333 !important;
}

/* --- Options & Gift Row --- */
.sun-cart-options-gift-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /* Gift text is wider in reference */
    gap: 40px;
    margin-bottom: 30px;
    margin-top: 50px;
}

@media (max-width: 991px) {
    .sun-cart-options-gift-row {
        grid-template-columns: 1fr;
    }
}

.sun-cart-options-section {
    max-width: 450px;
}

.sun-cart-options-desc {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.sun-cart-option-toggle {
    margin-bottom: 12px;
}

.sun-cart-option-btn {
    width: 100%;
    background: #2c3e3a;
    /* Dark green/teal */
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.sun-cart-option-btn .toggle-arrow {
    margin-inline-start: auto;
    font-size: 12px;
}

.sun-cart-option-field {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sun-cart-option-field.open {
    max-height: 100px;
    padding-top: 15px;
}

.sun-cart-input-group {
    display: flex;
    gap: 10px;
}

.sun-cart-input-group .form-control {
    border-radius: 8px;
}

.sun-cart-apply-btn {
    background: #2c3e3a;
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
}

.sun-cart-gift-section {
    flex: 1;
}

.sun-cart-gift-hint {
    text-align: end;
    font-size: 13px;
    color: #999;
}

.sun-cart-gift-textarea {
    border-radius: 12px !important;
    background: #f9f9f9 !important;
    border: 1px solid #eee !important;
    padding: 20px !important;
}

/* --- Order Summary --- */
.sun-cart-summary-section {
    max-width: 400px;
    margin-inline-start: auto;
    /* Push to left in RTL */
    text-align: start;
}

.sun-cart-summary-list {
    margin-bottom: 25px;
}

.sun-cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
    color: #555;
}

.sun-cart-summary-row strong {
    color: #333;
}

.sun-cart-summary-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 18px;
    font-weight: 700;
    color: #333 !important;
}

.sun-cart-summary-total strong {
    font-size: 20px;
}

.sun-checkout-btn {
    width: 100%;
    background: #2c3e3a !important;
    color: #fff !important;
    height: 55px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
}

.curreny img {
    height: 14px;
    margin-inline-start: 4px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .cart_product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart_product-tools {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- Address Section (Restored) --- */
.sun-cart-address-section {
    margin-bottom: 40px;
    text-align: start;
}

.cart-address-tabs .nav-pills {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    gap: 15px;
}

.cart-address-tabs .nav-link {
    background: #f9f9f9;
    color: #666;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-address-tabs .nav-link.active {
    background: #2c3e3a !important;
    color: #fff !important;
    border-color: #2c3e3a;
}

.sun-cart-address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.address-item {
    cursor: pointer;
}

.address-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin-bottom: 0;
}

.address-info-card {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    background: #fff;
    transition: all 0.2s;
    text-align: start;
}

.address-item input[type="radio"]:checked+.address-info-card {
    border-color: #2c3e3a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #f8fcfb;
}

.address-name {
    display: block;
    font-weight: 700;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}

.address-details {
    font-size: 14px;
    color: #777;
    margin: 0;
    line-height: 1.6;
}

.address-form-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    text-align: start;
}

.map-input-group {
    display: flex;
    gap: 10px;
}

.map-locate-btn {
    background: #2c3e3a;
    color: #fff;
    border: none;
    width: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.grid-full {
    grid-column: 1 / -1;
}