/* 
         * ==========================================
         * GLOBAL STYLES
         * ==========================================
         * Base styles for the application, including font family,
         * background colors for dark/light modes, and flexbox layout.
         */
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #2b3035;
            /* Default Dark Mode Background */
            min-height: 100vh;
            /* Ensure full viewport height */
            display: flex;
            flex-direction: column;
            /* Stack content vertically */
            color: #f8f9fa;
            /* Default Light Text */
            transition: background-color 0.5s ease, color 0.5s ease;
            /* Smooth theme transition */
        }

        /* Wrapper to push footer to the bottom of the page */
        .content-wrapper {
            flex: 1;
            /* Takes up remaining vertical space */
        }

        /* 
         * ==========================================
         * CARD COMPONENT STYLING
         * ==========================================
         * Custom styles for Bootstrap cards to match the theme.
         */
        .card {
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            /* Default Dark Mode Shadow */
            transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
            background-color: #212529;
            /* Dark Card Background */
            color: #f8f9fa;
        }

        /* Light Mode Card Overrides */
        [data-bs-theme="light"] .card {
            background-color: #ffffff !important;
            color: #212529 !important;
            border: 1px solid rgba(0, 0, 0, 0.1);
            /* Subtle border for definition */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            /* Stronger shadow for separation on white bg */
        }

        /* Hover Effects for Cards */
        .card:hover {
            transform: translateY(-5px);
            /* Lift effect */
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
            /* Enhanced shadow on hover */
        }

        .product-img {
            padding: 10px;
            border-radius: 12px;
            width: 100%;
            height: auto;
            object-fit: cover;
        }

        /* 
         * ==========================================
         * NAVBAR STYLING
         * ==========================================
         */
        .navbar {
            background-color: #212529;
            /* Dark Mode Navbar */
            overflow: hidden;
            transition: background-color 0.5s ease;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            /* Subtle shadow for depth */
        }

        [data-bs-theme="light"] .navbar {
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .navbar .container-fluid,
        .navbar .navbar-collapse {
            align-items: center;
        }

        .navbar .navbar-brand,
        .navbar .nav-link {
            padding-top: 12px;
            padding-bottom: 12px;
            display: inline-flex;
            align-items: center;
        }

        .navbar .navbar-brand i,
        .navbar .nav-link i {
            margin: 0;
            padding: 0;
            line-height: 1;
            vertical-align: middle;
        }

        /* Light Mode Navbar Overrides */
        [data-bs-theme="light"] .navbar {
            background-color: #ffffff !important;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        /* Navbar Links */
        .navbar a {
            float: left;
            display: block;
            color: #f8f9fa;
            text-align: center;
            padding: 14px 16px;
            text-decoration: none;
            font-size: 17px;
            transition: color 0.3s ease, background-color 0.3s ease;
            text-transform: uppercase;
            font-weight: bold;
        }

        [data-bs-theme="light"] .navbar a {
            color: #212529;
        }

        /* Navbar Link Hover Effects */
        .navbar a:hover {
            color: #adb5bd;
            /* Gray Hover in Dark Mode */
        }

        [data-bs-theme="light"] .navbar a:hover {
            color: #000000;
            /* Deep Black for Contrast in Light Mode */
            font-weight: 500;
        }

        .navbar a.active {
            background-color: #adb5bd;
            color: white;
        }

        /* Navbar Toggler (Hamburger Menu) Customization */
        [data-bs-theme="light"] .navbar-toggler {
            border-color: rgba(0, 0, 0, 0.1);
        }

        [data-bs-theme="light"] .navbar-toggler-icon {
            /* Custom SVG for dark icon in light mode */
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        }

        /* 
         * ==========================================
         * FOOTER STYLING
         * ==========================================
         */
        .footer-custom {
            padding-top: 40px;
            padding-bottom: 20px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* Footer Links */
        .footer-links a {
            transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
            color: #f8f9fa;
            display: inline-block;
        }

        [data-bs-theme="light"] .footer-links a {
            color: #212529;
        }

        .footer-links a:hover {
            color: #adb5bd !important;
            transform: scale(1.05);
            /* Breathing Effect */
        }

        [data-bs-theme="light"] .footer-links a:hover {
            color: #000000 !important;
            /* Deep Black Contrast */
        }

        /* 
         * ==========================================
         * BRAND TEXT (NEWSTARN STYLE)
         * ==========================================
         * Clean branding: "News" in themed color, "tarn" in red, "." in themed color.
         * No gradient / background-clip trick to avoid white outline on "tarn".
         */
        .brand-text {
            font-weight: 900;
            letter-spacing: -0.025em;
            font-size: inherit;
            display: inline;
        }

        [data-bs-theme="dark"] .brand-text {
            color: #ffffff;
        }

        [data-bs-theme="light"] .brand-text {
            color: #111827;
        }

        .brand-text .brand-tarn {
            color: #dc2626 !important;
        }

        .brand-text .brand-dot {
            color: inherit !important;
        }

        /* 
         * ==========================================
         * SOCIAL ICONS (TAILWIND EXTRACTED)
         * ==========================================
         */
        .social-icon-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            text-decoration: none;
            background-color: #343a40;
            /* bg-gray-800 */
            color: #adb5bd;
            /* text-gray-400 */
            padding: 0;
            margin: 0;
            line-height: 1;
            /* Fix vertical centering */
            position: relative;
        }

        .social-icon-btn i {
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            margin: 0;
            padding: 0;
            font-size: inherit;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        [data-bs-theme="light"] .social-icon-btn {
            background-color: #e9ecef;
            /* bg-gray-200 */
            color: #6c757d;
            /* text-gray-600 */
        }

        .social-icon-btn:hover {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            /* shadow-lg */
            color: #ffffff !important;
            -webkit-text-fill-color: #ffffff;
        }

        .social-icon-facebook:hover {
            background-color: #2563eb !important;
        }

        /* hover:bg-blue-600 */
        .social-icon-instagram:hover {
            background-color: #db2777 !important;
        }

        /* hover:bg-pink-600 */
        .social-icon-youtube:hover {
            background-color: #dc2626 !important;
        }

        /* hover:bg-red-600 */

        @media (max-width: 575.98px) {
            .social-icon-btn {
                width: 24px;
                height: 24px;
                font-size: 0.875rem;
                /* text-sm */
            }
        }

        @media (max-width: 991.98px) {
            .navbar .navbar-nav .nav-link {
                padding-left: 0;
                padding-right: 0.75rem;
            }

            .navbar .navbar-nav .nav-link .bi {
                margin-left: 0;
                margin-right: 0.5rem;
            }
        }

        /* Payment Icons */
        .payment-icon {
            font-size: 2rem;
            margin-right: 10px;
            color: #adb5bd;
        }

        [data-bs-theme="light"] .payment-icon {
            color: #495057;
        }

        /* Footer Bottom Links (Privacy/Terms) */
        .footer-bottom-link {
            color: #f8f9fa;
            transition: color 0.3s ease;
        }

        [data-bs-theme="light"] .footer-bottom-link {
            color: #212529;
        }

        .footer-bottom-link:hover {
            color: #adb5bd;
        }

        /* 
         * ==========================================
         * THEME TOGGLE BUTTON
         * ==========================================
         */
        .theme-toggle {
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 50%;
            transition: background-color 0.3s;
            height: 44px;
            display: inline-flex;
            align-items: center;
        }

        .theme-toggle:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        /* 
         * ==========================================
         * MODAL & BUTTON STYLING
         * ==========================================
         */
        .policy-links a {
            color: #adb5bd;
            text-decoration: none;
            margin: 0 15px;
            transition: color 0.3s ease;
        }

        .policy-links a:hover {
            color: #fff;
            text-decoration: underline;
        }

        .stylish-email-input .input-group-text {
            background-color: transparent;
            border-color: rgba(255, 255, 255, 0.25);
        }

        [data-bs-theme="light"] .stylish-email-input .input-group-text {
            background-color: #e9ecef;
            border-color: #ced4da;
        }

        .stylish-email-input .form-control {
            background-color: rgba(0, 0, 0, 0.4);
            border-color: rgba(255, 255, 255, 0.25);
            color: #f8f9fa;
        }

        [data-bs-theme="light"] .stylish-email-input .form-control {
            background-color: #ffffff;
            border-color: #ced4da;
            color: #212529;
        }

        .stylish-email-input .form-control::placeholder {
            color: #6c757d;
        }

        [data-bs-theme="light"] .stylish-email-input .form-control::placeholder {
            color: #adb5bd;
        }

        .email-error-alert {
            margin-top: 0.5rem;
            padding: 0.5rem 0.75rem;
            border-radius: 0.75rem;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border: 1px solid rgba(220, 53, 69, 0.6);
            background-color: rgba(220, 53, 69, 0.1);
            color: #f8d7da;
        }

        [data-bs-theme="light"] .email-error-alert {
            background-color: #f8d7da;
            color: #842029;
            border-color: #f5c2c7;
        }

        .email-error-alert i {
            flex-shrink: 0;
        }

        .mobile-compare-label {
            color: #f8f9fa;
        }

        [data-bs-theme="light"] .mobile-compare-label {
            color: #212529;
            font-weight: 600;
        }

        /* Button Border/Shadow Adjustments for Themes */
        [data-bs-theme="dark"] .btn-light {
            border: 1px solid rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
        }

        [data-bs-theme="dark"] .btn-light:hover {
            box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.10);
        }

        [data-bs-theme="light"] .btn-dark {
            border: 1px solid rgba(0, 0, 0, 0.2);
            box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.04);
        }

        [data-bs-theme="light"] .btn-dark:hover {
            box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.08);
        }

        /* Theme-aware Modal Styles */
        [data-bs-theme="dark"] .modal-content {
            background-color: #212529;
            color: #f8f9fa;
        }

        [data-bs-theme="light"] .modal-content {
            background-color: #ffffff;
            color: #212529;
        }

        [data-bs-theme="dark"] .modal-header,
        [data-bs-theme="dark"] .modal-body {
            border-color: rgba(255, 255, 255, 0.1);
        }

        [data-bs-theme="light"] .modal-header,
        [data-bs-theme="light"] .modal-body {
            border-color: rgba(0, 0, 0, 0.1);
        }

        /* Close Button Contrast Fixes */
        [data-bs-theme="dark"] .btn-close {
            filter: invert(1);
        }

        [data-bs-theme="light"] .btn-close {
            filter: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cline x1='2' y1='2' x2='14' y2='14' stroke='rgba(33,37,41,0.95)' stroke-width='2'/%3e%3cline x1='14' y1='2' x2='2' y2='14' stroke='rgba(33,37,41,0.95)' stroke-width='2'/%3e%3c/svg%3e") !important;
            opacity: 1;
        }

        @media (max-width: 767.98px) {
            .footer-custom .row {
                align-items: flex-start;
            }

            .footer-custom .col-md-3 {
                margin-bottom: 1.5rem;
            }
        }

        .footer-custom .copyright {
            font-size: 0.875rem;
            opacity: 0.85;
        }

        /* Navbar Cart Icon */
        .cart-icon i {
            color: #f8f9fa;
            transition: color 0.3s ease, transform 0.3s ease;
        }

        [data-bs-theme="light"] .cart-icon i {
            color: #212529;
        }

        .cart-icon:hover i {
            transform: translateY(-2px);
            color: #adb5bd;
        }

        [data-bs-theme="light"] .cart-icon:hover i {
            color: #495057;
        }

        /* 
         * ==========================================
         * UTILITY CLASSES & COMPONENTS
         * ==========================================
         */
        .text-muted-custom {
            color: #adb5bd;
            /* Lighter gray for Dark Mode readability */
            transition: color 0.3s ease;
        }

        [data-bs-theme="light"] .text-muted-custom {
            color: #495057 !important;
            /* Dark gray for Light Mode contrast */
            font-weight: 500;
            /* Added weight for better visibility */
        }

        /* Feature Box Styling */
        .feature-box {
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #f8f9fa;
        }

        [data-bs-theme="light"] .feature-box {
            background-color: #f8f9fa;
            /* Lighter gray background */
            border: 1px solid #dee2e6;
            color: #212529;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        /* Modal Hero Section */
        .modal-hero-section {
            padding: 2rem 1rem;
            border-radius: 12px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 2rem;
        }

        [data-bs-theme="light"] .modal-hero-section {
            background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
            border: 1px solid #e9ecef;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        /* Table Contrast Fixes for Light Mode */
        [data-bs-theme="light"] .table {
            color: #212529;
            --bs-table-bg: transparent;
            --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
            --bs-table-color: #212529;
        }

        [data-bs-theme="light"] .table th,
        [data-bs-theme="light"] .table td {
            color: #212529;
            /* Force dark text */
        }

        /* Ensure custom muted text in table is visible */
        [data-bs-theme="light"] .table .text-muted-custom {
            color: #495057 !important;
        }

        /* Cart Modal Light Mode Fixes */
        [data-bs-theme="light"] #cartItems h6,
        [data-bs-theme="light"] #cartItems small,
        [data-bs-theme="light"] #cartItems span,
        [data-bs-theme="light"] #cartItems .fw-bold,
        [data-bs-theme="light"] .modal-content #cartTotal,
        [data-bs-theme="light"] .modal-content .cart-total-label,
        [data-bs-theme="light"] #cartItems .opacity-75,
        [data-bs-theme="light"] #cartItems .text-nowrap,
        [data-bs-theme="light"] #cartItems .list-group .border-bottom div {
            color: #212529 !important;
        }

        /* 
         * ==========================================
         * ACTION BUTTONS (ADD TO CART & DETAILS)
         * ==========================================
         */
        .add-to-cart,
        .btn-modal-add-to-cart {
            transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
            border: none;
        }

        .add-to-cart:hover,
        .btn-modal-add-to-cart:hover {
            transform: scale(1.02);
            /* Reduced intensity */
        }

        .add-to-cart i,
        .btn-modal-add-to-cart i {
            transition: transform 0.2s ease;
            color: inherit;
            /* Icon matches text color */
        }

        .add-to-cart:hover i,
        .btn-modal-add-to-cart:hover i {
            transform: translateY(-2px);
        }

        /* Dark Mode: Transparent BG, White Text (Default) -> White BG, Black Text (Hover) */
        [data-bs-theme="dark"] .add-to-cart,
        [data-bs-theme="dark"] .btn-modal-add-to-cart {
            background-color: transparent;
            color: #f8f9fa;
            border: 2px solid #f8f9fa;
        }

        [data-bs-theme="dark"] .add-to-cart:hover,
        [data-bs-theme="dark"] .btn-modal-add-to-cart:hover {
            background-color: #f8f9fa;
            color: #000000;
        }

        /* Light Mode: Button White, Text Black (Default) -> Black BG, White Text (Hover) */
        [data-bs-theme="light"] .add-to-cart,
        [data-bs-theme="light"] .btn-modal-add-to-cart {
            background-color: #f8f9fa;
            color: #000;
            border: 1px solid #ced4da;
            /* Subtle border for visibility on white */
        }

        [data-bs-theme="light"] .add-to-cart:hover,
        [data-bs-theme="light"] .btn-modal-add-to-cart:hover {
            background-color: #000000;
            color: #ffffff;
            border-color: #000000;
        }

        [data-bs-theme="dark"] .add-to-cart.btn-success,
        [data-bs-theme="dark"] .btn-modal-add-to-cart.btn-success {
            background-color: #f8f9fa !important;
            color: #000000 !important;
            border-color: #ced4da !important;
        }

        [data-bs-theme="dark"] .add-to-cart.btn-success i,
        [data-bs-theme="dark"] .btn-modal-add-to-cart.btn-success i {
            color: #000000 !important;
        }

        [data-bs-theme="light"] .btn-modal-add-to-cart.btn-success,
        [data-bs-theme="light"] .btn-modal-add-to-cart.btn-success i {
            background-color: #f8f9fa !important;
            color: #000000 !important;
            border-color: #ced4da !important;
        }

        /* Details Button Customization (Sync with Add to Cart) */
        .btn-custom-details {
            transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
            border: 2px solid;
            font-weight: 500;
        }

        .btn-custom-details:hover {
            transform: translateY(-2px);
        }

        /* Dark Mode: Outline White -> Hover White BG/Black Text */
        [data-bs-theme="dark"] .btn-custom-details {
            background-color: transparent;
            color: #f8f9fa;
            border-color: #f8f9fa;
        }

        [data-bs-theme="dark"] .btn-custom-details:hover {
            background-color: #f8f9fa;
            color: #000;
        }

        /* Light Mode: Outline Black -> Hover Black BG/White Text */
        [data-bs-theme="light"] .btn-custom-details {
            background-color: transparent;
            color: #000;
            border-color: #000;
        }

        [data-bs-theme="light"] .btn-custom-details:hover {
            background-color: #000;
            color: #fff;
        }

        /* Modal Text Size Optimization */
        .modal-hero-title {
            font-size: 2rem;
            font-weight: 700;
        }

        @media (min-width: 768px) {
            .modal-hero-title {
                font-size: 2.5rem;
            }
        }

        /* Ensure modal text contrast in both modes */
        [data-bs-theme="dark"] .modal-body,
        [data-bs-theme="dark"] .modal-header,
        [data-bs-theme="dark"] .modal-footer {
            border-color: rgba(255, 255, 255, 0.1);
        }

        [data-bs-theme="light"] .modal-body,
        [data-bs-theme="light"] .modal-header,
        [data-bs-theme="light"] .modal-footer {
            border-color: rgba(0, 0, 0, 0.1);
        }





        /* 
         * ==========================================
         * BACK TO TOP BUTTON
         * ==========================================
         */
        .back-to-top {
            position: fixed;
            right: 20px;
            bottom: 20px;
            z-index: 1050;
            display: none;
            background-color: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0;
            width: auto;
            height: auto;
            outline: none;
        }

        .back-to-top.show {
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }


