:root {
    --primary-green: #10542c;
    --secondary-gold: #b99331;
    --cream-white: #fdfcf0;
    --text-dark: #1a1a1a;
    --shadow-premium: 0 10px 20px rgba(0, 0, 0, 0.08);
    --transition-smooth: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon {
    background: #f1f1f1;
    border: none;
    color: #e74c3c;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #fee;
    transform: scale(1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-family: 'Cairo', sans-serif;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--primary-green);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.logo {
    height: 55px;
    background: white;
    border-radius: 50%;
    padding: 5px;
    transition: var(--transition-smooth);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--secondary-gold);
}

.search-container {
    flex-grow: 0.5;
    margin: 0 2rem;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    border: none;
    font-family: 'Cairo';
    transition: var(--transition-smooth);
}

.search-container input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(185, 147, 49, 0.4);
}

.cart-container {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 12px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-container:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--secondary-gold), #e5c05b);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid var(--primary-green);
    box-shadow: 0 0 15px rgba(185, 147, 49, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Cart Bump Animation */
.cart-bump {
    animation: cartBump 0.4s ease-out;
}

@keyframes cartBump {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.hero-slider {
    height: 100vh;
    width: 100%;
}

.heroSwiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 0 5%;
    max-width: 900px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    border: 2px solid white;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: white;
    color: var(--primary-green);
}

/* Swiper styles are now in index.html for higher specificity */

.btn-premium {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    background-color: var(--secondary-gold);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 20px rgba(185, 147, 49, 0.4);
    border: none;
    cursor: pointer;
}

.catalog {
    padding: 5rem 5%;
    background: white;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--primary-green);
    margin-bottom: 3.5rem;
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    border: 2px solid var(--primary-green);
    background: white;
    color: var(--primary-green);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-green);
    color: white;
}

.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    border: 1px solid rgba(16, 84, 44, 0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 84, 44, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-quick-view {
    background: white;
    color: var(--primary-green);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transform: translateY(20px);
    transition: 0.4s;
}

.product-card:hover .btn-quick-view {
    transform: translateY(0);
}

.product-info {
    padding: 2rem;
    text-align: center;
    background: #E4EB9C;
}

.product-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(185, 147, 49, 0.1);
    color: var(--secondary-gold);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.btn-add-cart {
    width: 100%;
    padding: 1rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Cairo';
}

.btn-add-cart:hover {
    background: #0d4624;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(16, 84, 44, 0.2);
}

.btn-add-cart:active {
    transform: translateY(-1px) scale(0.98);
}

.feature-card {
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    background: #fdfcf0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.stats {
    padding: 5rem 5%;
    background: var(--primary-green);
    color: white;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 3100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.modal-close:hover {
    color: var(--secondary-gold);
    transform: scale(1.2) rotate(90deg);
}

.checkout-content {
    max-width: 1100px !important;
    background: #f8f9fa !important;
}

.checkout-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    padding: 25px;
    height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-gold) transparent;
}

@media (max-width: 992px) {
    .checkout-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 85vh;
    }

    .checkout-sidebar {
        position: static;
        order: 1;
    }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

@media (max-width: 480px) {
    .payment-options-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-body::-webkit-scrollbar {
    width: 6px;
}

.checkout-body::-webkit-scrollbar-thumb {
    background-color: var(--secondary-gold);
    border-radius: 10px;
}

.cart-item-row {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-item-row:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
}

.qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--secondary-gold);
    background: white;
    color: var(--primary-green);
    cursor: pointer;
    transition: 0.2s;
}

.qty-btn:hover {
    background: var(--secondary-gold);
    color: white;
}

.checkout-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
}

.checkout-main section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0f0f0;
    margin-bottom: 25px;
}

/* Input Styling */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.input-group label {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    right: 15px;
    color: var(--secondary-gold);
    font-size: 1.1rem;
    pointer-events: none;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: 12px 45px 12px 15px;
    /* More padding on the right for the icon */
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    border-color: var(--secondary-gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(185, 147, 49, 0.1);
    outline: none;
}

/* Payment Cards */
.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.payment-card {
    cursor: pointer;
    position: relative;
}

.payment-card input {
    position: absolute;
    opacity: 0;
}

.payment-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    background: white;
    border: 2px solid #eee;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-align: center;
    gap: 10px;
}

.payment-card-content i {
    font-size: 1.8rem;
    color: #ddd;
    transition: 0.3s;
}

.payment-card-content span {
    font-weight: 700;
    color: #555;
    font-size: 0.9rem;
}

.payment-card-content small {
    color: #999;
    font-size: 0.75rem;
}

.payment-card input:checked+.payment-card-content {
    border-color: var(--secondary-gold);
    background: #fdfcf0;
    box-shadow: 0 8px 20px rgba(185, 147, 49, 0.1);
}

.payment-card input:checked+.payment-card-content i {
    color: var(--secondary-gold);
    transform: scale(1.1);
}

.payment-card input:checked+.payment-card-content span {
    color: var(--primary-green);
}

.invoice-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-gold) transparent;
}

.invoice-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.invoice-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--secondary-gold);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .invoice-footer-actions {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .invoice-modal .modal-content {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 992px) {
    #menuToggle {
        display: block !important;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-green);
        padding: 2rem;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .search-container {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .logo {
        height: 45px;
    }

    .nav-links {
        padding: 1.5rem;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    width: 180px;
    list-style: none;
    border-radius: 10px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: var(--primary-green) !important;
    padding: 0.7rem 1rem;
    display: block;
}

@keyframes highlightSection {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(185, 147, 49, 0.05);
    }

    100% {
        background-color: transparent;
    }
}

.catalog.highlight {
    animation: highlightSection 1.5s ease-out;
}

.skeleton-card {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 20px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
    height: 400px;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

.glass-nav {
    background: rgba(16, 84, 44, 0.9) !important;
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(185, 147, 49, 0.2);
}

.gold-gradient-text {
    color: var(--secondary-gold);
    font-weight: 800;
}

/* Premium Checkout Modal Styles */
#checkoutModal .modal-content {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    border-radius: 30px;
    padding: 0;
    overflow-y: auto;
    border: none;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) transparent;
}

.checkout-header {
    background: linear-gradient(135deg, #10542c, #1a7a42);
    color: white;
    padding: 2rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 5px solid var(--secondary-gold);
    box-shadow: 0 5px 25px rgba(16, 84, 44, 0.4);
}

.checkout-header h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.checkout-header p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.checkout-header p {
    opacity: 0.8;
    font-size: 0.9rem;
}

#checkoutForm {
    padding: 2rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

/* --- Amazon Style UI Redesign --- */
.amazon-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #f8fafc;
    padding: 35px;
    border-radius: 20px;
}

@media (min-width: 900px) {
    .amazon-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.amazon-main-col {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.amazon-side-col {
    width: 100%;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 2px solid var(--secondary-gold);
}

@media (min-width: 900px) {
    .amazon-side-col {
        width: 300px;
        position: sticky;
        top: 20px;
    }
}

.amazon-cart-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.amazon-cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.amazon-cart-item:last-child {
    border-bottom: none;
}

.amazon-item-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
}

.amazon-item-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.amazon-item-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--secondary-gold);
    display: block;
    margin-bottom: 5px;
}

.amazon-qty-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.amazon-qty-pill {
    display: flex;
    align-items: center;
    border: 2px solid var(--secondary-gold);
    border-radius: 50px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 10px rgba(185, 147, 49, 0.1);
}

.amazon-qty-btn {
    background: white;
    border: none;
    padding: 5px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.amazon-qty-btn:hover {
    background: #f0f0f0;
}

.amazon-qty-val {
    padding: 0 10px;
    font-weight: 700;
    font-size: 1rem;
    color: #0f1111;
}

.amazon-delete-btn {
    background: none;
    border: none;
    color: #007185;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
}

.amazon-delete-btn:hover {
    text-decoration: underline;
    color: #c40000;
}

.amazon-btn {
    background: var(--primary-green);
    border: none;
    border-radius: 15px;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 10px 25px rgba(16, 84, 44, 0.2);
    transition: all 0.3s ease;
    font-family: 'Cairo';
}

.amazon-btn:hover {
    background: var(--secondary-gold);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(185, 147, 49, 0.3);
}

.amazon-section-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary-green);
    border-bottom: 4px solid var(--secondary-gold);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Adjust modal for Amazon layout */
#checkoutModal .modal-content {
    max-width: 1000px;
    /* Wider for 2 columns */
    border-radius: 12px;
    background: #eaeded;
    /* Amazon background */
}

#checkoutModal .checkout-header {
    background: #232f3e;
    /* Amazon dark header */
    border-bottom: none;
    padding: 1.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#checkoutModal .checkout-header h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

#checkoutModal .checkout-header p {
    display: none;
}

#checkoutModal .modal-close {
    position: static;
    font-size: 2rem;
    color: white !important;
}

.advanced-input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 1px solid #888c8c;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-smooth);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 17, 17, .15) inset;
}

.advanced-input:focus {
    border-color: #e77600;
    box-shadow: 0 0 3px 2px rgba(228, 121, 17, .5);
    outline: none;
}

.input-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-container label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-family: 'Cairo';
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.input-container input:focus,
.input-container select:focus {
    border-color: var(--secondary-gold);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.order-summary-box {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px solid #f0f0f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.premium-form {
    background: #fdfdfd;
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: 2rem;
}

.premium-form::-webkit-scrollbar {
    width: 8px;
}

.premium-form::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--secondary-gold);
    color: var(--primary-green);
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    filter: brightness(1.1);
}

/* Payment Method Styles */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

.payment-option {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.payment-option:hover {
    border-color: var(--secondary-gold);
    background: #fdfcf0;
}

.payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.payment-option.active {
    border-color: var(--secondary-gold);
    background: #fdfcf0;
    box-shadow: 0 4px 12px rgba(185, 147, 49, 0.1);
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
}

.payment-info p {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: #777;
}

.payment-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.payment-icons img {
    height: 20px;
    object-fit: contain;
}

/* Invoice Modal Styles */
.invoice-modal .modal-content {
    max-width: 800px !important;
    padding: 0 !important;
    background: #f4f4f4 !important;
}

.invoice-container {
    background: white;
    padding: 40px;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.invoice-logo img {
    height: 60px;
}

.invoice-title {
    text-align: left;
}

.invoice-title h1 {
    color: var(--primary-green);
    margin: 0;
    font-size: 2rem;
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.invoice-col h3 {
    font-size: 0.9rem;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.invoice-col p {
    margin: 5px 0;
    font-weight: 600;
    color: #333;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-table th {
    background: #f8f9fa;
    text-align: right;
    padding: 12px 15px;
    border-bottom: 2px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

.invoice-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.invoice-total-section {
    display: flex;
    justify-content: flex-end;
}

.invoice-total-table {
    width: 250px;
}

.invoice-total-table tr td {
    padding: 8px 0;
    border: none;
}

.invoice-total-table tr.grand-total td {
    border-top: 2px solid var(--primary-green);
    padding-top: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-green);
}

.invoice-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.85rem;
}

.print-btn {
    background: var(--primary-green);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
}

@media print {
    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }

    /* Hide everything except the invoice modal */
    body>*:not(#successModal) {
        display: none !important;
    }

    #successModal {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        background: white !important;
        display: block !important;
        visibility: visible !important;
        padding: 0;
        margin: 0;
        z-index: 9999;
    }

    #successModal .modal-content {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }

    /* Hide UI buttons during print */
    .checkout-header,
    .print-btn,
    #redirectToWaBtn,
    .modal-close,
    .btn-premium {
        display: none !important;
    }

    .invoice-container {
        margin: 0 !important;
        padding: 20px !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        visibility: visible !important;
    }

    .invoice-container * {
        visibility: visible !important;
    }
}

/* Tracking ID success modal tweaks */
.success-modal {
    text-align: center;
    padding: 2rem;
}

.tracking-number {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 10px;
    font-family: monospace;
    font-size: 1.5rem;
    margin: 1.5rem 0;
    color: var(--primary-green);
    border: 2px dashed var(--secondary-gold);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: relative;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 2000;
    text-decoration: none;
    transition: var(--transition-smooth);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #128c7e;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 3000;
}

/* Redesigned Chatbot Styles (TOBi Style) */
.ai-chat-window {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: #f4f4f4;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 4000;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.ai-chat-header {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.ai-chat-header h4 {
    margin: 0;
    color: #333;
    font-weight: 700;
    width: 100%;
    text-align: center;
}

#closeChat {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.ai-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #e60000 #f1f1f1;
}

/* Initial State Styles */
.ai-initial-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.ai-mascot-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    display: flex;
    justify-content: center;
}

.ai-mascot-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.ai-welcome-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    text-align: center;
}

.ai-welcome-card p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}

.ai-lang-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.ai-lang-btns button {
    width: 100%;
    padding: 12px;
    background: #e60000;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Cairo';
}

.ai-lang-btns button:hover {
    filter: brightness(1.2);
}

/* Message Styles */
.ai-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.ai-message.user {
    align-self: flex-end;
    background: #e60000;
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 2px;
    margin-left: 45px;
}

.bot-avatar {
    position: absolute;
    right: 100%;
    margin-right: 10px;
    top: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    object-fit: cover;
}

.ai-chat-footer {
    background: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #eee;
}

#aiInput {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-family: 'Cairo';
    font-size: 0.9rem;
    background: #f9f9f9;
    border-radius: 25px;
}

#aiInput:focus {
    outline: none;
    background: #f1f1f1;
}

#aiSendBtn {
    background: none;
    border: none;
    color: #e60000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    padding: 5px;
}

@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 20px;
    }

    .ai-chat-float,
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .ai-chat-window {
        width: 300px;
        height: 450px;
        bottom: 80px;
        right: 20px;
    }
}

/* Star Rating Styles */
.rating-container {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.rating-container h4 {
    margin-bottom: 15px;
    color: var(--primary-green);
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
}

.star {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.star.active {
    color: #f1c40f;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.star:hover {
    transform: scale(1.2);
}

.rating-submitted {
    color: #27ae60;
    font-weight: 700;
    margin-top: 10px;
    display: none;
}

.ai-chat-float {
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

/* Star Rating Styles */
.rating-container {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.rating-container h4 {
    margin-bottom: 15px;
    color: var(--primary-green);
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
}

.star {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.star.active {
    color: #f1c40f;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.star:hover {
    transform: scale(1.2);
}

.rating-submitted {
    color: #27ae60;
    font-weight: 700;
    margin-top: 10px;
    display: none;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1s infinite ease-in-out;
    margin: 0 2px;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.ai-quick-actions button {
    background: white;
    border: 1px solid #e60000;
    color: #e60000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Cairo';
}

.ai-quick-actions button:hover {
    background: #e60000;
    color: white;
}

.ai-action-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #e60000;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.ai-action-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.ai-action-btn.wa {
    background: #25d366;
}

/* ============================================================
   PREMIUM AUTH & TOAST NOTIFICATIONS
   ============================================================ */
.auth-modal-content {
    max-width: 440px !important;
    padding: 60px 40px !important;
    border-radius: 35px !important;
    background: #ffffff !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2) !important;
    text-align: center;
    border: 4px solid var(--primary-green) !important;
    position: relative;
}

.auth-modal-content .modal-close {
    color: var(--primary-green) !important;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
}

.auth-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--primary-green);
    position: relative;
    display: inline-block;
}

.auth-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--secondary-gold);
    border-radius: 10px;
}

.social-auth-vertical {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 35px;
}

.tiktok-btn {
    width: 100%;
    height: 62px;
    border: 2px solid var(--primary-green);
    /* Green Border */
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Cairo';
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-green);
}

.tiktok-btn:hover {
    border-color: var(--secondary-gold);
    background: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(185, 147, 49, 0.3);
    color: var(--secondary-gold);
}

.tiktok-btn i {
    font-size: 1.6rem;
    width: 45px;
    transition: 0.3s;
}

.tiktok-btn:hover i {
    transform: rotate(10deg) scale(1.2);
}

.tiktok-btn .btn-text {
    flex: 1;
    text-align: center;
}

.tiktok-btn.google {
    border-color: #DB4437;
    color: #DB4437;
}

.tiktok-btn.google:hover {
    border-color: var(--secondary-gold);
    color: var(--secondary-gold);
}

.tiktok-btn.google i {
    color: #DB4437;
}

.tiktok-btn.phone i {
    color: var(--primary-green);
}

.tiktok-btn.phone:hover i {
    color: var(--secondary-gold);
}

.tiktok-submit {
    background: var(--primary-green) !important;
    color: white !important;
    border: none !important;
    height: 60px !important;
    font-size: 1.2rem !important;
    border-radius: 18px !important;
    box-shadow: 0 15px 30px rgba(16, 84, 44, 0.3) !important;
    font-weight: 800 !important;
}

.tiktok-submit:hover {
    background: var(--secondary-gold) !important;
    transform: translateY(-3px);
}

.auth-footer {
    margin-top: 30px;
    font-size: 1.05rem;
    color: #555;
    border-top: 2px dashed #eee;
    padding-top: 25px;
}

.auth-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 900;
    padding: 5px 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.auth-footer a:hover {
    background: rgba(185, 147, 49, 0.1);
    color: var(--secondary-gold);
}

.auth-input-dark {
    width: 100%;
    height: 60px;
    background: #fdfcf0;
    border: 2px solid #eee;
    border-radius: 18px;
    padding: 0 25px;
    font-family: 'Cairo';
    margin-bottom: 25px;
    outline: none;
    transition: 0.3s;
    font-size: 1.1rem;
    font-weight: 600;
}

.auth-input-dark:focus {
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 15px rgba(16, 84, 44, 0.1);
}

.auth-input-dark:focus {
    border-color: var(--primary-green);
    background: white;
}

/* User Profile Icon in Nav */
.user-profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-gold);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

.user-profile-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(185, 147, 49, 0.5);
}

.user-profile-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Toast Notification System */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-out {
    animation: toast-out 0.4s ease forwards !important;
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* --- Comprehensive Responsiveness & Device Optimization --- */

/* Laptops & Small Desktops (max-width: 1200px) */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets & Large Phones (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .checkout-body {
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    .checkout-sidebar {
        position: static !important;
        width: 100% !important;
        margin-top: 30px;
    }

    .checkout-content {
        max-width: 95% !important;
        margin: 20px auto;
        height: 90vh !important;
        overflow-y: auto;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    nav {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .logo {
        height: 45px;
    }

    .search-container {
        display: block;
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
        flex-grow: 1;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--primary-green);
        flex-direction: column;
        justify-content: center;
        padding: 50px 30px;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 3000;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex !important;
        color: white;
        font-size: 1.6rem;
        cursor: pointer;
        order: 2;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .quality-banner h2 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }

    .quality-banner h3 {
        font-size: 1.1rem !important;
    }

    .section-title {
        font-size: 2rem;
    }

    .trust-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }

    .floating-actions {
        bottom: 20px;
        right: 15px;
    }

    /* Checkout Specific Mobile Fixes */
    .checkout-content {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .checkout-body {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
        height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .checkout-sidebar {
        position: static !important;
        width: 100% !important;
        margin-top: 0 !important;
    }

    .cart-item {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
    }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-btns .btn-premium,
    .hero-btns .btn-outline {
        width: 100%;
        padding: 15px;
    }

    .checkout-header h2 {
        font-size: 1.1rem !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .payment-card-content {
        padding: 12px !important;
    }

    .payment-card-content span {
        font-size: 1rem !important;
    }

    .auth-content {
        width: 95% !important;
        padding: 25px 15px !important;
    }
}

/* Extra Large Screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 5rem;
    }
}

/* --- Universal Printing System for All Devices --- */
@media print {

    /* Hide absolutely everything except the invoice capture area */
    body * {
        visibility: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #successModal,
    #successModal *,
    #invoice-capture,
    #invoice-capture * {
        visibility: visible !important;
    }

    #successModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        display: block !important;
        opacity: 1 !important;
    }

    .modal-content.success-content {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Hide modal buttons during print */
    .success-footer,
    .modal-close,
    button,
    .no-print {
        display: none !important;
    }

    #invoice-capture {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
    }

    /* Page setup */
    @page {
        margin: 1cm;
        size: auto;
    }
}

/* Support for Dark Mode UI refinement */
@media (prefers-color-scheme: dark) {
    .toast {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

/* Success Modal Base Style */
#successModal .modal-content.success-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border: none;
    background: #f8f9fa;
}

#successModal .invoice-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

/* Invoice & Success Modal Responsive Fixes */
@media (max-width: 768px) {
    #successModal .modal-content.success-content {
        width: 95% !important;
        max-height: 94vh !important;
        border-radius: 16px !important;
    }
    
    #successModal .modal-content.success-content > div:first-child {
        padding: 15px 10px !important;
    }
    
    #successModal .modal-content.success-content > div:first-child h2 {
        font-size: 1.12rem !important;
    }
    
    #successModal .modal-content.success-content > div:first-child p {
        font-size: 0.78rem !important;
    }
    
    #successModal .modal-content.success-content > div:first-child div[style*="width: 70px"] {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 5px !important;
    }
    
    #successModal .modal-content.success-content > div:first-child div[style*="width: 70px"] i {
        font-size: 1.3rem !important;
    }
    
    #successModal .modal-close {
        top: 8px !important;
        right: 12px !important;
        font-size: 1.8rem !important;
    }

    #successModal .invoice-scroll-area {
        padding: 12px !important;
    }
    
    /* Footer buttons */
    #successModal .success-footer {
        padding: 12px 10px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #successModal .success-footer button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.9rem !important;
        margin: 0 !important;
    }

    .invoice-container {
        padding: 15px !important;
        border-radius: 10px !important;
    }

    .invoice-container > div:first-child {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .invoice-container > div:nth-child(2) > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .invoice-container > div:nth-child(2) > div:nth-child(3) {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
    }

    .invoice-container table {
        font-size: 0.8rem !important;
    }

    .invoice-container div[style*="width: 300px"],
    .invoice-container div[style*="width: 250px"],
    .invoice-container div[style*="width: 280px"],
    .invoice-container div[style*="width: 220px"] {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .invoice-container {
        padding: 10px !important;
    }
    
    .invoice-container > div:first-child {
        padding: 15px 10px !important;
    }
    
    .invoice-container > div:first-child img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .invoice-container h1 {
        font-size: 1.2rem !important;
    }
    
    .invoice-container p {
        font-size: 0.75rem !important;
    }
    
    .invoice-container > div:nth-child(2) {
        padding: 15px 10px !important;
    }
    
    .invoice-container > div:nth-child(2) > div:first-child > div {
        padding: 10px !important;
    }
    
    .invoice-container h3 {
        font-size: 0.9rem !important;
        padding-bottom: 6px !important;
        margin-bottom: 8px !important;
    }
    
    .invoice-container table {
        font-size: 0.75rem !important;
    }
    
    .invoice-container table th,
    .invoice-container table td {
        padding: 6px 4px !important;
    }
    
    .invoice-container div[style*="width: 280px"] {
        width: 100% !important;
    }
    
    .invoice-container div[style*="width: 220px"] {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .invoice-container div[style*="border-top: 2px solid"] {
        font-size: 1.05rem !important;
    }
    
    .invoice-container > div:nth-child(2) > div:last-child {
        margin-top: 15px !important;
        padding-top: 10px !important;
    }
}

/* --- Terms & Conditions Modal Responsive Fix --- */
#termsModal .terms-modal-content {
    max-width: 850px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#termsModal .terms-body {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    padding: 40px;
}

#termsModal .terms-footer {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Responsiveness on tablet and phone screens */
@media (max-width: 768px) {
    #termsModal .terms-modal-content {
        border-radius: 16px;
        max-height: 92vh;
    }
    
    #termsModal .terms-modal-content > div:first-child {
        padding: 15px 15px 20px !important;
    }
    
    #termsModal .terms-modal-content > div:first-child h2 {
        font-size: 1.15rem !important;
    }
    
    #termsModal .terms-modal-content > div:first-child p {
        font-size: 0.75rem !important;
    }
    
    #termsModal .terms-modal-content > div:first-child .modal-close {
        top: 8px !important;
        right: 12px !important;
        font-size: 1.8rem !important;
    }
    
    #termsModal .terms-modal-content > div:first-child div[style*="width: 60px"] {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 8px !important;
        border-radius: 10px !important;
    }

    #termsModal .terms-body {
        padding: 20px 15px !important;
    }
    
    #termsModal .terms-body > div > div {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    #termsModal .terms-body h4 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }
    
    #termsModal .terms-body ul {
        gap: 8px !important;
    }
    
    #termsModal .terms-body li {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    #termsModal .terms-body div[style*="border: 1px dashed"] {
        margin-top: 10px !important;
        padding: 8px !important;
        font-size: 0.8rem !important;
    }

    #termsModal .terms-footer {
        padding: 15px 10px !important;
    }

    #termsModal .terms-footer label {
        margin-bottom: 12px !important;
        padding: 8px 12px !important;
        gap: 8px !important;
        display: inline-flex !important;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        border-radius: 25px !important;
    }
    
    #termsModal .terms-footer label input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0;
    }

    #termsModal .terms-footer label span {
        font-size: 0.85rem !important;
        text-align: right;
        line-height: 1.3;
    }

    #termsModal #proceedToInvoiceBtn {
        padding: 12px !important;
        font-size: 0.95rem !important;
        border-radius: 12px !important;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }
}