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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f8f9fa;
        }

        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1rem 2rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        nav {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        nav h1 {
            font-size: 1.8rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        header:nth-of-type(1) > nav:nth-of-type(1) > h1:nth-of-type(1) > img:nth-of-type(1),
        .logo-icon {
            height: 2.85rem;
            width: auto;
            max-height: 48px;
            display: inline-block;
            vertical-align: middle;
            object-fit: contain;
            flex-shrink: 0;
            filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.95))
                    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.95))
                    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
                    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.95))
                    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
                    contrast(1.3)
                    brightness(1.1);
            transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
        }

        header:nth-of-type(1) > nav:nth-of-type(1) > h1:nth-of-type(1) > img:nth-of-type(1):hover,
        .logo-icon:hover {
            transform: scale(1.05);
            filter: drop-shadow(1.5px 0 0 #ffffff)
                    drop-shadow(-1.5px 0 0 #ffffff)
                    drop-shadow(0 1.5px 0 #ffffff)
                    drop-shadow(0 -1.5px 0 #ffffff)
                    drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55))
                    contrast(1.35)
                    brightness(1.15);
        }

        nav a {
            color: white;
            margin-left: 2rem;
            text-decoration: none;
            transition: opacity 0.3s;
        }

        nav a:hover {
            opacity: 0.8;
        }

        .nav-links {
            display: flex;
            align-items: center;
        }

        .nav-toggle {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
            flex-direction: column;
            justify-content: center;
            gap: 5px;
        }

        .nav-toggle span {
            display: block;
            width: 26px;
            height: 3px;
            background: white;
            border-radius: 2px;
            transition: transform 0.25s ease, opacity 0.25s ease;
        }

        .nav-toggle[aria-expanded="true"] span:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }

        .nav-toggle[aria-expanded="true"] span:nth-child(2) {
            opacity: 0;
        }

        .nav-toggle[aria-expanded="true"] span:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

        .disclosure-banner {
            background: #fff3cd;
            color: #664d03;
            text-align: center;
            padding: 0.6rem 1rem;
            font-size: 0.88rem;
            border-bottom: 1px solid #ffe69c;
        }

        .disclosure-banner a {
            color: #664d03;
            font-weight: 600;
        }

        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 4rem 2rem;
            text-align: center;
        }

        .hero-content {
            max-width: 1200px;
            margin: 0 auto;
        }

        .hero h2 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }

        .hero p {
            font-size: 1.1rem;
            margin-bottom: 2rem;
            opacity: 0.95;
        }

        .cta-button {
            display: inline-block;
            background: white;
            color: #667eea;
            padding: 0.75rem 2rem;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 600;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .cta-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        .section-title {
            font-size: 2rem;
            margin-bottom: 2rem;
            text-align: center;
            color: #333;
        }

        .product-search-container,
        #product-search-container {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            z-index: 500;
            max-width: 760px;
            margin: 0 auto 2.25rem;
            width: 100%;
            padding: 0.65rem 0.5rem;
            background: rgba(248, 249, 250, 0.96);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-bottom: 1px solid rgba(226, 232, 240, 0.85);
            border-radius: 0 0 14px 14px;
            box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
            transition: box-shadow 0.2s ease, background-color 0.2s ease;
        }

        .product-search-bar-row,
        div:nth-of-type(2) > section#products:nth-of-type(1) > div#product-search-container:nth-of-type(2) > div:nth-of-type(1) {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: 100%;
            flex-wrap: wrap;
        }

        .product-search-bar {
            position: relative;
            display: flex;
            align-items: center;
            background: #ffffff;
            border: 1px solid #d1d5db;
            border-radius: 9999px;
            padding: 0.35rem 0.5rem 0.35rem 1.1rem;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            flex: 1 1 280px;
            min-width: 240px;
        }

        .product-category-select-wrapper,
        .product-sort-select-wrapper {
            position: relative;
            flex: 0 0 auto;
        }

        .product-category-select,
        .product-sort-select {
            appearance: none;
            -webkit-appearance: none;
            background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%236b7280%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E") no-repeat right 1rem center;
            border: 1px solid #d1d5db;
            border-radius: 9999px;
            padding: 0.6rem 2.25rem 0.6rem 1.1rem;
            font-size: 0.9rem;
            font-family: inherit;
            color: #374151;
            font-weight: 500;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            max-width: 230px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .product-category-select:focus,
        .product-sort-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .product-category-pills {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            justify-content: center;
            margin-top: 0.85rem;
        }

        .category-pill {
            border: 1px solid #e2e8f0;
            background: #ffffff;
            color: #4b5563;
            padding: 0.32rem 0.85rem;
            border-radius: 9999px;
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            user-select: none;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
        }

        .category-pill:hover {
            border-color: #cbd5e1;
            background: #f8fafc;
            color: #1e293b;
        }

        .category-pill.active {
            background: #667eea;
            border-color: #667eea;
            color: #ffffff;
            font-weight: 600;
            box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
        }

        .category-pill .pill-count {
            font-size: 0.72rem;
            padding: 0.1rem 0.45rem;
            border-radius: 999px;
            background: #f1f5f9;
            color: #64748b;
            font-weight: 600;
        }

        .category-pill.active .pill-count {
            background: rgba(255, 255, 255, 0.25);
            color: #ffffff;
        }

        /* Showcase Collection Navigation Tabs */
        .product-showcase-tabs {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 1.25rem;
            padding: 0.35rem;
        }

        .showcase-tab-btn {
            border: 1px solid #e2e8f0;
            background: #ffffff;
            color: #475569;
            padding: 0.45rem 1.1rem;
            border-radius: 9999px;
            font-size: 0.88rem;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            user-select: none;
            white-space: nowrap;
        }

        .showcase-tab-btn:hover {
            border-color: #cbd5e1;
            background: #f8fafc;
            color: #0f172a;
            transform: translateY(-1px);
        }

        .showcase-tab-btn.active {
            background: #1e293b;
            border-color: #0f172a;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
        }

        .showcase-tab-btn .showcase-count {
            display: none !important;
        }

        .showcase-tab-btn.active .showcase-count {
            display: none !important;
        }

        /* Storefront Load More Products Container */
        .products-pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 2.25rem;
            padding: 1.5rem 0.5rem 0.75rem;
            border-top: 1px solid #e2e8f0;
        }

        .load-more-btn {
            background: #ffffff;
            border: 1.5px solid #cbd5e1;
            color: #1e293b;
            font-weight: 600;
            font-size: 0.95rem;
            padding: 0.75rem 2.25rem;
            min-height: 44px;
            border-radius: 9999px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            font-family: inherit;
            letter-spacing: 0.01em;
            user-select: none;
            -webkit-user-select: none;
        }

        .load-more-btn:hover:not(:disabled) {
            background: #f8fafc;
            border-color: #64748b;
            color: #0f172a;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(0,0,0,0.09);
        }

        .load-more-btn:active:not(:disabled) {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }

        .load-more-btn:focus-visible {
            outline: 2px solid #6366f1;
            outline-offset: 2px;
        }

        .load-more-btn:disabled {
            opacity: 0.8;
            cursor: wait;
            background: #f8fafc;
            border-color: #e2e8f0;
            color: #64748b;
            transform: none;
            box-shadow: none;
        }

        .load-more-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid #cbd5e1;
            border-top-color: #4f46e5;
            border-radius: 50%;
            animation: cv-spin 0.7s linear infinite;
        }

        @keyframes cv-spin {
            to { transform: rotate(360deg); }
        }

        .product-card-category {
            display: inline-block;
            font-size: 0.75rem;
            font-weight: 600;
            color: #4338ca;
            background: #eef2ff;
            border-radius: 4px;
            padding: 0.18rem 0.5rem;
            margin-bottom: 0.5rem;
            text-decoration: none;
            cursor: pointer;
            transition: background 0.15s ease, color 0.15s ease;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .product-card-category:hover {
            background: #e0e7ff;
            color: #3730a3;
        }

        .product-category-tag {
            display: inline-block;
            font-size: 0.8rem;
            font-weight: 600;
            color: #4338ca;
            background: #eef2ff;
            border-radius: 4px;
            padding: 0.15rem 0.55rem;
            text-decoration: none;
        }

        .product-category-tag:hover {
            background: #e0e7ff;
            color: #3730a3;
        }

        .product-search-bar:focus-within {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .product-search-bar .search-icon {
            font-size: 1rem;
            color: #6b7280;
            margin-right: 0.65rem;
            user-select: none;
            display: flex;
            align-items: center;
        }

        #product-search-input,
        .product-search-bar input[type="search"] {
            flex: 1;
            min-width: 0;
            border: none;
            background: transparent;
            outline: none;
            font-size: 1rem;
            font-family: inherit;
            color: #1f2937;
            padding: 0.5rem 0.25rem;
            -webkit-appearance: none;
        }

        .product-search-bar input[type="search"]::-webkit-search-cancel-button {
            display: none;
        }

        .product-search-bar input[type="search"]::placeholder {
            color: #9ca3af;
            opacity: 1;
        }

        .search-clear-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            color: #6b7280;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            font-weight: 700;
            padding: 0;
            transition: background 0.15s ease, color 0.15s ease;
            flex-shrink: 0;
        }

        .search-clear-btn:hover {
            background: #f3f4f6;
            color: #111827;
        }

        /* --- Recent Searches Dropdown --- */
        .recent-searches-dropdown {
            position: absolute;
            top: calc(100% + 7px);
            left: 0;
            right: 0;
            width: 100%;
            min-width: 260px;
            background: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
            z-index: 100;
            overflow: hidden;
            padding: 0.35rem 0 0.45rem;
            box-sizing: border-box;
            text-align: left;
        }

        .recent-searches-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.45rem 1rem 0.35rem;
            border-bottom: 1px solid #f3f4f6;
            margin-bottom: 0.25rem;
        }

        .recent-searches-title {
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #6b7280;
        }

        .recent-searches-clear-all {
            background: none;
            border: none;
            padding: 2px 6px;
            font-size: 0.75rem;
            color: #9ca3af;
            cursor: pointer;
            border-radius: 4px;
            font-family: inherit;
            transition: color 0.15s ease, background 0.15s ease;
        }

        .recent-searches-clear-all:hover {
            color: #dc2626;
            background: #fef2f2;
        }

        .recent-searches-list {
            max-height: 250px;
            overflow-y: auto;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .recent-search-item {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.55rem 1rem;
            cursor: pointer;
            transition: background-color 0.12s ease;
            user-select: none;
        }

        .recent-search-item:hover,
        .recent-search-item.highlighted {
            background-color: #f8fafc;
        }

        .recent-search-clock-icon {
            color: #9ca3af;
            flex-shrink: 0;
        }

        .recent-search-item:hover .recent-search-clock-icon,
        .recent-search-item.highlighted .recent-search-clock-icon {
            color: #667eea;
        }

        .recent-search-text {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.9rem;
            color: #374151;
            font-weight: 400;
        }

        .recent-search-item:hover .recent-search-text,
        .recent-search-item.highlighted .recent-search-text {
            color: #111827;
            font-weight: 500;
        }

        .recent-search-remove-btn {
            background: transparent;
            border: none;
            color: #9ca3af;
            cursor: pointer;
            font-size: 0.75rem;
            padding: 3px 6px;
            border-radius: 4px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.15s ease, color 0.15s ease;
            flex-shrink: 0;
        }

        .recent-search-remove-btn:hover {
            background-color: #fee2e2;
            color: #dc2626;
        }

        .product-search-count {
            text-align: center;
            margin-top: 0.6rem;
            font-size: 0.875rem;
            color: #6b7280;
            min-height: 1.25rem;
        }

        .products-empty-msg {
            color: #6b7280;
            grid-column: 1 / -1;
            text-align: center;
            padding: 2.5rem 1rem;
            background: #ffffff;
            border-radius: 8px;
            border: 1px dashed #d1d5db;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
            justify-content: center;
            gap: 2rem;
            margin-bottom: 3rem;
            width: 100%;
        }

        .product-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
            max-width: 380px;
            width: 100%;
            margin: 0 auto;
            border: 1px solid #e5e7eb;
        }

        .product-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
        }

        .product-image {
            width: 100%;
            aspect-ratio: 3 / 2;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #4b5563;
            font-size: 3rem;
            overflow: hidden;
            position: relative;
            max-height: 240px;
        }

        .product-image img,
        div#products-grid .product-image img,
        div#products-grid > div > div:nth-of-type(1) > img:nth-of-type(1) {
            max-width: 100%;
            max-height: 240px;
            object-fit: contain;
            background: #ffffff;
            display: block;
            margin: auto;
        }

        /* Per-product override: admin can choose "fill frame" instead of the
           safe default above, for photos that are already close to 3:2 and
           look better filling the box than padded. */
        .product-image.fit-cover img {
            object-fit: cover;
            background: none;
            width: 100%;
            height: 100%;
        }

        /* Amazon-Style Search Results List View */
        .products-grid.search-results-list {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            max-width: 1040px;
            margin: 0 auto 3rem;
        }

        .products-grid.search-results-list .product-card {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            max-width: 100%;
            width: 100%;
            margin: 0;
            padding: 1.35rem 1.65rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
            background: #ffffff;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .products-grid.search-results-list .product-card:hover {
            transform: none;
            border-color: #cbd5e1;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        }

        .products-grid.search-results-list .product-image {
            flex: 0 0 240px;
            width: 240px;
            min-width: 240px;
            max-width: 240px;
            height: 210px;
            max-height: 210px;
            aspect-ratio: auto;
            background: #ffffff;
            border: 1px solid #f1f5f9;
            border-radius: 6px;
            margin: 0;
            padding: 0.5rem;
            box-sizing: border-box;
            position: relative;
        }

        .products-grid.search-results-list .product-image img,
        .products-grid.search-results-list > div > div:nth-of-type(1) > img:nth-of-type(1) {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            background: transparent;
            margin: auto;
        }

        .products-grid.search-results-list .product-image.fit-cover img {
            object-fit: cover;
            width: 100%;
            height: 100%;
        }

        /* Badges matching Amazon's "Best Seller" / "Previously viewed" */
        .search-card-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: #c45500;
            color: #ffffff;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 3px;
            z-index: 2;
            letter-spacing: 0.02em;
            text-transform: capitalize;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
            white-space: nowrap;
            line-height: 1.3;
        }

        .search-card-badge.featured-badge {
            background: #374151;
        }

        .products-grid.search-results-list .product-info {
            flex: 1;
            min-width: 0;
            padding: 0 0 0 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .search-brand-row {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            margin-bottom: 0.25rem;
            flex-wrap: wrap;
        }

        .search-brand-name {
            font-size: 1.15rem;
            font-weight: 700;
            color: #0f1111;
            letter-spacing: -0.01em;
        }

        .search-result-title {
            font-size: 1.05rem;
            font-weight: 500;
            line-height: 1.4;
            color: #0f1111;
            margin: 0 0 0.4rem 0;
        }

        .search-result-title a {
            color: #0f1111;
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .search-result-title a:hover {
            color: #007185;
            text-decoration: underline;
        }

        .search-result-rating {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.9rem;
            margin-bottom: 0.45rem;
            flex-wrap: wrap;
        }

        .search-result-rating .rating-num {
            font-weight: 600;
            color: #0f1111;
            font-size: 0.92rem;
        }

        .search-result-rating .rating-stars {
            color: #e67a00;
            letter-spacing: 0.08em;
            font-size: 0.95rem;
        }

        .search-result-rating .rating-count {
            color: #007185;
            font-size: 0.88rem;
            text-decoration: none;
            cursor: pointer;
        }

        .search-result-rating .rating-count:hover {
            color: #c45500;
            text-decoration: underline;
        }

        .search-result-cta-row {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            margin: 0.45rem 0 0.55rem;
            flex-wrap: wrap;
        }

        .search-see-options-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff;
            border: 1px solid #d5d9d9;
            border-radius: 9999px;
            padding: 0.42rem 1.25rem;
            font-size: 0.88rem;
            font-weight: 500;
            color: #0f1111;
            text-decoration: none;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(213, 217, 217, 0.4);
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .search-see-options-btn:hover {
            background: #f7fafa;
            border-color: #a6a9a9;
            box-shadow: 0 2px 5px rgba(213, 217, 217, 0.7);
        }

        .search-result-pricing {
            display: flex;
            align-items: baseline;
            gap: 0.55rem;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
        }

        .search-price-val {
            font-size: 1.3rem;
            font-weight: 700;
            color: #0f1111;
        }

        .search-offers-count {
            font-size: 0.88rem;
            color: #007185;
            font-weight: 500;
        }

        .search-stock-tag {
            font-size: 0.8rem;
            color: #059669;
            font-weight: 600;
            background: #ecfdf5;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
        }

        .search-result-desc {
            font-size: 0.92rem;
            line-height: 1.45;
            color: #4b5563;
            margin: 0 0 0.75rem 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .section-title.search-active {
            text-align: left;
            font-size: 1.65rem;
            font-weight: 700;
            color: #0f1111;
            margin: 0 auto 0.4rem;
            max-width: 1040px;
            padding-bottom: 0.25rem;
        }

        .search-results-subtext {
            text-align: left;
            font-size: 0.92rem;
            color: #565959;
            margin: 0 auto 1.25rem;
            max-width: 1040px;
            padding-bottom: 0.6rem;
            border-bottom: 1px solid #e5e7eb;
        }

        /* View Mode Toggle Buttons */
        .product-view-toggle-wrapper {
            display: inline-flex;
            align-items: center;
            background: #f1f5f9;
            border: 1px solid #d1d5db;
            border-radius: 9999px;
            padding: 2px;
            gap: 2px;
            flex-shrink: 0;
        }

        .view-toggle-btn {
            background: transparent;
            border: none;
            border-radius: 9999px;
            padding: 0.45rem 0.65rem;
            font-size: 0.85rem;
            color: #64748b;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .view-toggle-btn:hover {
            color: #1e293b;
        }

        .view-toggle-btn.active {
            background: #ffffff;
            color: #0f1111;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            font-weight: 600;
        }

        /* Responsive Layout for Search Results List & Products Grid */
        @media (max-width: 640px) {
            .products-grid {
                grid-template-columns: 1fr;
                gap: 1.25rem;
            }

            .products-grid.search-results-list .product-card {
                flex-direction: column;
                align-items: center;
                padding: 1rem;
            }

            .products-grid.search-results-list .product-image {
                flex: none;
                width: 100%;
                max-width: 240px;
                height: 190px;
                margin: 0 auto 1rem;
            }

            .products-grid.search-results-list .product-info {
                padding: 0;
                width: 100%;
            }

            .section-title.search-active {
                font-size: 1.4rem;
                padding-left: 0.5rem;
            }
        }

        /* Product detail page (product.html) — main photo + thumbnail strip.
           Main photo follows the same contain-by-default / fit-cover-opt-in
           rule as .product-image above so a product looks identical on the
           homepage and on its own page. Thumbnails always crop to fill --
           at 64px, a small consistent square matters more than showing the
           full photo, and the main image above is there for the full view. */
        .product-gallery {
            max-width: 480px;
            margin: 0 0 1.5rem;
        }

        .product-gallery-main {
            width: 100%;
            aspect-ratio: 3 / 2;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            overflow: hidden;
        }

        .product-gallery-main img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #f8f9fa;
            display: block;
        }

        .product-gallery-main.fit-cover img {
            object-fit: cover;
            background: none;
        }

        .product-gallery-thumbs {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.6rem;
        }

        .product-gallery-thumb {
            width: 64px;
            height: 64px;
            flex-shrink: 0;
            padding: 0;
            border: 2px solid transparent;
            border-radius: 6px;
            overflow: hidden;
            background: none;
            cursor: pointer;
        }

        .product-gallery-thumb img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                }

                /* Lazy loading placeholder styles */
                .product-image img[loading="lazy"],
                .product-gallery-main img[loading="lazy"],
                .product-gallery-thumb img[loading="lazy"] {
                    opacity: 0;
                    transition: opacity 0.3s ease;
                }

                .product-image img[loading="lazy"].loaded,
                .product-gallery-main img[loading="lazy"].loaded,
                .product-gallery-thumb img[loading="lazy"].loaded {
                    opacity: 1;
                }

                /* Skeleton loading for images */
                .product-image.loading,
                .product-gallery-main.loading {
                    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
                    background-size: 200% 100%;
                    animation: shimmer 1.5s infinite;
                }

                @keyframes shimmer {
                    0% { background-position: 200% 0; }
                    100% { background-position: -200% 0; }
                }

                .product-gallery-thumb.active {
                    border-color: #667eea;
                }

        .product-info {
            padding: 1.5rem;
        }

        .product-info h3 {
            margin-bottom: 0.5rem;
            color: #333;
        }

        .product-info p {
            color: #666;
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        .affiliate-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 42px;
            box-sizing: border-box;
            background: #667eea;
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            text-decoration: none;
            font-size: 0.9rem;
            transition: background 0.3s;
        }

        .affiliate-link:hover {
            background: #764ba2;
            transform: translateY(-1px);
        }

        .affiliate-link:focus-visible,
        .product-deal-cta:focus-visible {
            outline: 3px solid rgba(102, 126, 234, 0.35);
            outline-offset: 2px;
        }

        /* Product Card Actions & Social Sharing */
        .product-card-actions {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin-bottom: 0.85rem;
        }

        .product-review-link {
            display: inline-flex;
            align-items: center;
            color: #667eea;
            font-size: 0.88rem;
            font-weight: 500;
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .product-review-link:hover {
            color: #4338ca;
            text-decoration: underline;
        }

        .product-share-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding-top: 0.75rem;
            border-top: 1px solid #f1f5f9;
            flex-wrap: wrap;
        }

        .product-share-bar-article {
            margin-top: 1.25rem;
            padding: 0.85rem 1rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
        }

        .share-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            display: inline-flex;
            align-items: center;
        }

        .share-btn-group {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            flex-wrap: wrap;
        }

        .share-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.32rem;
            padding: 0.28rem 0.55rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 5px;
            font-size: 0.76rem;
            font-weight: 500;
            color: #475569;
            text-decoration: none;
            cursor: pointer;
            line-height: 1;
            transition: all 0.15s ease;
            user-select: none;
            font-family: inherit;
        }

        .share-btn:hover {
            background: #ffffff;
            border-color: #cbd5e1;
            color: #1e293b;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        .share-btn:active {
            transform: scale(0.97);
        }

        .share-btn .share-icon {
            display: inline-block;
            flex-shrink: 0;
            vertical-align: middle;
        }

        .share-btn-copy:hover {
            border-color: #818cf8;
            background: #eef2ff;
            color: #4338ca;
        }

        .share-btn-copy.copied {
            border-color: #10b981 !important;
            background: #ecfdf5 !important;
            color: #047857 !important;
        }

        .share-btn-wa:hover {
            border-color: #25d366;
            background: #f0fdf4;
            color: #15803d;
        }

        .share-btn-wa .share-icon {
            color: #25d366;
        }

        .share-btn-x:hover {
            border-color: #0f172a;
            background: #f8fafc;
            color: #0f172a;
        }

        @media (max-width: 480px) {
            .product-share-bar {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.45rem;
            }
            .share-btn-group {
                width: 100%;
                justify-content: flex-start;
            }
        }

        .features {
            background: white;
            padding: 2rem;
            border-radius: 8px;
            margin-bottom: 3rem;
        }

        .feature-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }

        .feature-item {
            text-align: center;
        }

        .feature-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }

        .feature-item h4 {
            margin-bottom: 0.5rem;
            color: #667eea;
        }

        .feature-item p {
            color: #666;
            font-size: 0.95rem;
        }

        footer {
            background: #2c3e50;
            color: white;
            text-align: center;
            padding: 2.5rem 1.5rem 2rem;
            margin-top: 3rem;
        }

        footer:nth-of-type(1) > div:nth-of-type(1),
        footer .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0;
        }

        footer p {
            margin-bottom: 0.75rem;
            line-height: 1.6;
        }

        footer .disclosure-footer {
            max-width: 760px;
            margin: 0 auto 0.75rem;
            font-size: 0.85rem;
            line-height: 1.6;
            color: #cfd8e3;
        }

        footer a {
            color: #cfd8e3;
            text-decoration: underline;
            transition: color 0.2s ease;
        }

        footer a:hover {
            color: #ffffff;
        }

        .footer-newsletter {
            max-width: 580px;
            margin: 0 auto 2rem;
            text-align: center;
        }

        .newsletter-title {
            color: #ffffff;
            font-size: 1.35rem;
            font-weight: 700;
            margin: 0 0 0.5rem;
            letter-spacing: -0.01em;
        }

        .newsletter-subtitle {
            color: #cfd8e3;
            font-size: 0.95rem;
            line-height: 1.5;
            margin: 0 auto 1.25rem;
            max-width: 480px;
        }

        .newsletter-form {
            width: 100%;
            margin: 0 auto;
        }

        .newsletter-input-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            max-width: 480px;
            margin: 0 auto;
        }

        .newsletter-input {
            flex: 1;
            min-width: 0;
            padding: 0.75rem 1rem;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.22);
            background: #ffffff;
            color: #1e293b;
            font-size: 0.95rem;
            font-family: inherit;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .newsletter-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.35);
        }

        .newsletter-input::placeholder {
            color: #94a3b8;
        }

        .newsletter-submit-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #ffffff;
            border: none;
            border-radius: 6px;
            padding: 0.75rem 1.6rem;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            box-shadow: 0 2px 6px rgba(102, 126, 234, 0.35);
            transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
        }

        .newsletter-submit-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.45);
        }

        .newsletter-submit-btn:active {
            transform: translateY(0);
        }

        .newsletter-submit-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .newsletter-status {
            margin-top: 0.75rem;
            font-size: 0.88rem;
            line-height: 1.4;
            padding: 0.5rem 0.85rem;
            border-radius: 4px;
            display: inline-block;
        }

        .newsletter-status.success {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .footer-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.12);
            max-width: 800px;
            margin: 0 auto 1.5rem;
        }

        @media (max-width: 540px) {
            .newsletter-input-wrap {
                flex-direction: column;
                width: 100%;
            }
            .newsletter-input {
                width: 100%;
            }
            .newsletter-submit-btn {
                width: 100%;
            }
        }

        .status-badge {
            background: #ffc107;
            color: #333;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            display: inline-block;
            margin-bottom: 1rem;
        }

        .reviews-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .review-card {
            background: white;
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border-left: 4px solid #667eea;
        }

        .review-card .stars {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
        }

        .review-card h4 {
            color: #333;
            margin-bottom: 0.5rem;
        }

        .review-card p {
            color: #666;
            margin-bottom: 0.5rem;
            line-height: 1.5;
        }

        .review-card small {
            color: #999;
            font-size: 0.85rem;
        }

        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .testimonial-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 2rem;
            border-radius: 8px;
            text-align: center;
            transition: transform 0.3s;
        }

        .testimonial-card:hover {
            transform: translateY(-4px);
        }

        .testimonial-card p {
            font-size: 1rem;
            margin-bottom: 1rem;
            font-style: italic;
        }

        .testimonial-card h4 {
            margin-bottom: 0.25rem;
            font-weight: 600;
        }

        .testimonial-card small {
            opacity: 0.9;
        }

        .contact-container {
            background: white;
            padding: 3rem;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .contact-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 3rem;
        }

        .contact-form form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .contact-form input,
        .contact-form textarea {
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: inherit;
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .submit-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 0.75rem 2rem;
            border: none;
            border-radius: 4px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
        }

        .contact-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
        }

        .info-item h4 {
            color: #667eea;
            margin-bottom: 0.5rem;
        }

        .info-item p {
            color: #666;
        }

        /* Tablet (iPad/Tab) and mobile: collapse the nav links behind a toggle.
           Desktop/laptop (>1024px) keep the full horizontal nav. */
        @media (max-width: 1024px) {
            nav {
                flex-wrap: wrap;
            }

            .nav-toggle {
                display: flex;
            }

            .nav-links {
                display: none;
                flex-direction: column;
                align-items: stretch;
                width: 100%;
                margin-top: 1rem;
            }

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

            .nav-links a {
                margin-left: 0;
                padding: 0.85rem 0.25rem;
                border-top: 1px solid rgba(255, 255, 255, 0.18);
            }
        }

        @media (max-width: 768px) {
            .hero h2 {
                font-size: 1.8rem;
            }

            .hero p {
                font-size: 1rem;
            }
        }

        @media (max-width: 480px) {
            nav h1 {
                font-size: 1.4rem;
                gap: 0.55rem;
            }

            header:nth-of-type(1) > nav:nth-of-type(1) > h1:nth-of-type(1) > img:nth-of-type(1),
            .logo-icon {
                height: 2.25rem;
                max-height: 36px;
            }

            header {
                padding: 1rem 1.25rem;
            }

            .contact-container {
                padding: 1.75rem 1.25rem;
            }

            .contact-content {
                gap: 2rem;
            }
        }

/* --- Guide / article pages & navigation --- */

.page-top-nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.page-top-nav .breadcrumb {
    max-width: none;
    margin: 0;
    padding: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    min-height: 42px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.back-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.back-btn:active {
    transform: translateY(1px);
    background: #e2e8f0;
}

.back-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.back-btn svg {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.back-btn:hover svg {
    transform: translateX(-2px);
}

.article-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.article-actions .see-product {
    margin-top: 0;
}

@media (max-width: 600px) {
    .page-top-nav {
        padding: 1.25rem 1rem 0;
        gap: 0.75rem;
    }

    .article-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.75rem;
    }

    .article-actions .see-product,
    .article-actions .back-btn {
        justify-content: center;
        text-align: center;
        min-height: 46px;
        width: 100%;
        box-sizing: border-box;
    }

    .page-top-nav .back-btn {
        min-height: 44px;
    }
}

.breadcrumb {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.article h1 {
    font-size: 2.1rem;
    margin-bottom: 0.5rem;
    color: #222;
}

.article .article-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.article h2 {
    font-size: 1.4rem;
    color: #667eea;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.7;
}

.article ul, .article ol {
    margin: 0 0 1rem 1.5rem;
    color: #333;
    line-height: 1.7;
}

.article li {
    margin-bottom: 0.4rem;
}

.article .callout {
    background: #f0f1fb;
    border-left: 4px solid #667eea;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article .callout strong {
    color: #667eea;
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.article th, .article td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
}

.article th {
    background: #f8f9fa;
    color: #667eea;
}

.article .see-product {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    min-height: 46px;
    box-sizing: border-box;
    background: #667eea;
    color: white;
    padding: 0.65rem 1.4rem;
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 700;
    visibility: visible !important;
    opacity: 1 !important;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.22);
}

.article .see-product:hover {
    background: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(102, 126, 234, 0.28);
}

/* --- Product Recommendations Section (Product Detail Page) --- */

.product-recommendations-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    width: 100%;
}

.product-recommendations-header {
    margin-bottom: 1.25rem;
}

.product-primary-deal {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 1rem;
}

.product-primary-deal .product-deal-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.5rem;
    box-sizing: border-box;
}

.rec-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

.rec-title a:hover {
    text-decoration: underline;
}

.rec-deal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.7rem;
    background: #667eea;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.rec-deal-button:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .product-primary-deal {
        width: 100%;
    }

    .product-primary-deal .product-deal-cta {
        width: 100%;
    }
}

.product-recommendations-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.3rem 0;
    letter-spacing: -0.01em;
}

.product-recommendations-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.product-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.rec-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
    text-decoration: none;
}

/* Image container organized like the main page .product-image (3:2 aspect ratio, max-height 200px, contain) */
.rec-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    max-height: 200px;
    border-bottom: 1px solid #f1f5f9;
}

.rec-image img,
.rec-img {
    max-width: 100%;
    max-height: 200px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    display: block;
    margin: auto;
    transition: transform 0.25s ease;
}

.rec-card:hover .rec-img {
    transform: scale(1.03);
}

.rec-merchant-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.rec-placeholder {
    font-size: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

.rec-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.rec-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4338ca;
    background: #eef2ff;
    border-radius: 4px;
    padding: 0.12rem 0.45rem;
    margin-bottom: 0.45rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: flex-start;
}

.rec-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.65rem 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.38rem;
    transition: color 0.15s ease;
}

.rec-card:hover .rec-title {
    color: #4f46e5;
}

.rec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.rec-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.rec-price-free {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.rec-action-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: color 0.15s ease;
}

.rec-card:hover .rec-action-badge {
    color: #3730a3;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .product-recommendations-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    .rec-image {
        max-height: 140px;
    }
    .rec-image img,
    .rec-img {
        max-height: 140px;
    }
    .rec-body {
        padding: 0.65rem;
    }
    .rec-title {
        font-size: 0.8rem;
        min-height: 2.15rem;
    }
    .rec-price {
        font-size: 0.95rem;
    }
    .rec-action-badge {
        font-size: 0.72rem;
    }
}

.rec-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 1.25rem 0.5rem 0.5rem;
    border-top: 1px solid #f1f5f9;
    width: 100%;
}

/* --- Guides index section on homepage --- */

div:nth-of-type(2) > section#guides:nth-of-type(2) > div:nth-of-type(1),
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.guides-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 3.5rem;
    padding: 0.5rem;
    width: 100%;
}

.guide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(99, 102, 241, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.guide-card-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.guide-card-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.guide-card-time-badge {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.guide-card h3 {
    color: #0f172a;
    margin: 0 0 0.65rem 0;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.guide-card:hover h3 {
    color: #4f46e5;
}

.guide-card p {
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
    flex: 1;
}

.guide-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.82rem;
}

.guide-card-picks-count {
    color: #059669;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.guide-card-link-arrow {
    color: #4f46e5;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease;
}

.guide-card:hover .guide-card-link-arrow {
    transform: translateX(4px);
}

/* --- Dynamic Buying Guide Page Editorial Styling (/guide.html) --- */

.guide-hero-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.guide-hero-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.guide-category-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #3730a3;
    background: #e0e7ff;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
}

.guide-verified-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #065f46;
    background: #d1fae5;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
}

.guide-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.guide-hero-summary {
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    max-width: 800px;
}

.guide-hero-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid #cbd5e1;
    font-size: 0.88rem;
}

.guide-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.guide-meta-label {
    color: #64748b;
}

.guide-meta-value {
    color: #0f172a;
    font-weight: 700;
}

.guide-meta-divider {
    width: 1px;
    height: 16px;
    background: #cbd5e1;
}

.guide-editorial-body {
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.65;
}

.guide-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.guide-section h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.guide-section-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

/* Comparison Table */
.guide-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.guide-comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.guide-comparison-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.guide-comparison-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.guide-comparison-table tr:last-child td {
    border-bottom: none;
}

.guide-comparison-table tr:hover td {
    background: #f8fafc;
}

.guide-table-prod-cell {
    min-width: 240px;
}

.guide-table-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px;
}

.guide-table-prod-link {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.guide-table-prod-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.guide-award-chip {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    white-space: nowrap;
}

.guide-table-price strong {
    color: #047857;
    font-size: 1rem;
}

.guide-table-cta-btn {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.guide-table-cta-btn:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   Dynamic Buying Guide Comparison Table Component
   ========================================================================== */

.guide-comp-component {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin: 1.5rem 0 2.5rem 0;
    overflow: hidden;
}

.guide-comp-header {
    padding: 1.5rem 1.75rem 1.25rem 1.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.guide-comp-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f46e5;
    background: #eef2ff;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.guide-comp-heading {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
}

.guide-comp-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.guide-comp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.guide-comp-filters {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.guide-comp-filter-btn {
    appearance: none;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.guide-comp-filter-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #f8fafc;
}

.guide-comp-filter-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.guide-comp-search-wrap {
    position: relative;
    min-width: 260px;
    flex: 1;
    max-width: 340px;
}

.guide-comp-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.guide-comp-search-input {
    width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 2.2rem;
    font-size: 0.84rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-comp-search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.guide-comp-scroll-hint {
    display: block;
    background: #f1f5f9;
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.guide-comp-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guide-comp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 760px;
}

/* Header Columns */
.guide-comp-th-spec {
    width: 220px;
    min-width: 200px;
    background: #f8fafc;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    vertical-align: bottom;
}

.guide-comp-spec-header-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.guide-comp-spec-header-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.2rem;
}

.guide-comp-th-prod {
    min-width: 210px;
    max-width: 250px;
    padding: 1.25rem 1rem;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    vertical-align: top;
    cursor: pointer;
    transition: background 0.15s ease;
}

.guide-comp-th-prod:last-child {
    border-right: none;
}

.guide-comp-prod-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.guide-comp-award-wrap {
    margin-bottom: 0.6rem;
}

.guide-comp-prod-img-wrap {
    width: 100%;
    height: 110px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.65rem;
    padding: 6px;
}

.guide-comp-prod-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.guide-comp-prod-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3rem;
}

.guide-comp-prod-name:hover {
    color: #4f46e5;
}

.guide-comp-prod-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.guide-comp-prod-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #047857;
}

.guide-comp-prod-discount,
.guide-comp-discount-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    white-space: nowrap;
}

.guide-comp-prod-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    background: #4f46e5;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    margin-top: auto;
    transition: background 0.15s ease, transform 0.1s ease;
}

.guide-comp-prod-cta:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Group Headers */
.guide-comp-group-row td {
    background: #f1f5f9;
    padding: 0.6rem 1rem;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.guide-comp-group-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #334155;
}

/* Feature Rows & Cells */
.guide-comp-row {
    border-bottom: 1px solid #f1f5f9;
}

.guide-comp-row:last-child {
    border-bottom: none;
}

.guide-comp-spec-label {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    vertical-align: middle;
}

.guide-comp-label-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.guide-comp-label-hint {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.guide-comp-diff-indicator {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    margin-top: 0.3rem;
}

.guide-comp-cell {
    padding: 0.85rem 1rem;
    border-right: 1px solid #f8fafc;
    vertical-align: middle;
    font-size: 0.85rem;
    color: #334155;
    background: #ffffff;
    transition: background 0.15s ease;
}

.guide-comp-cell:last-child {
    border-right: none;
}

/* Component badges & pills */
.guide-comp-advantage-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    line-height: 1.35;
}

.guide-comp-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    line-height: 1.3;
}

.guide-comp-pill-accent {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    font-weight: 700;
}

.guide-comp-price-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-comp-price-cell strong {
    font-size: 0.95rem;
    color: #047857;
}

.guide-comp-rating-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.guide-comp-star-score {
    font-weight: 700;
    color: #b45309;
    font-size: 0.85rem;
}

.guide-comp-order-vol {
    font-size: 0.72rem;
    color: #64748b;
}

.guide-comp-stock-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: #047857;
}

.guide-comp-table-cta {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: #2563eb;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.guide-comp-table-cta:hover {
    background: #1d4ed8;
}

/* Column Hover & Active States */
.guide-comp-th-prod.guide-comp-col-hover,
.guide-comp-cell.guide-comp-col-hover {
    background: #f8fafc !important;
}

.guide-comp-th-prod.guide-comp-col-active,
.guide-comp-cell.guide-comp-col-active {
    background: #eef2ff !important;
    border-color: #c7d2fe;
}

/* Small Screen Adjustments */
@media (max-width: 640px) {
    .guide-comp-header {
        padding: 1rem;
    }
    .guide-comp-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .guide-comp-search-wrap {
        max-width: 100%;
        min-width: 100%;
    }
    .guide-comp-filters {
        overflow-x: auto;
        padding-bottom: 0.25rem;
        flex-wrap: nowrap;
    }
    .guide-comp-filter-btn {
        white-space: nowrap;
    }
}

/* Criteria Grid */
.guide-criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.guide-criteria-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    gap: 0.85rem;
}

.guide-criteria-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
}

.guide-criteria-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.4rem 0;
}

.guide-criteria-content p {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.guide-callout {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.guide-callout-warning {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}

/* Spotlight Cards */
.guide-spotlights-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.guide-spotlight-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.guide-spotlight-award-banner {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guide-spotlight-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: center;
}

@media (max-width: 640px) {
    .guide-spotlight-grid {
        grid-template-columns: 1fr;
    }
}

.guide-spotlight-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    height: 180px;
    border: 1px solid #f1f5f9;
}

.guide-spotlight-img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.guide-spotlight-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
}

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

.guide-spotlight-title a:hover {
    color: #4f46e5;
}

.guide-spotlight-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
}

.guide-spotlight-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #059669;
}

.guide-spotlight-merchant {
    color: #64748b;
    font-weight: 500;
}

.guide-spotlight-rating {
    color: #d97706;
    font-weight: 600;
}

.guide-spotlight-orders {
    color: #64748b;
    font-size: 0.8rem;
}

.guide-spotlight-summary {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 1.25rem 0;
}

.guide-spotlight-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.guide-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    background: #047857;
    padding: 0.6rem 1.15rem;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(4, 120, 87, 0.2);
    transition: background 0.15s ease, transform 0.15s ease;
}

.guide-cta-btn-primary:hover {
    background: #065f46;
    transform: translateY(-1px);
}

.guide-cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.guide-cta-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Decision Matrix */
.guide-decision-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.guide-decision-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.guide-decision-card li {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    color: #334155;
}

.guide-decision-card li:last-child {
    margin-bottom: 0;
}

/* FAQ */
.guide-faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-faq-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
}

.guide-faq-question {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.guide-faq-answer {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

.guide-footer-action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* --- Standalone policy pages --- */

.policy-page {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 2.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
}

.policy-page h1 {
    margin-bottom: 0.5rem;
}

.policy-page .updated {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.policy-page h2 {
    color: #667eea;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.policy-page p, .policy-page ul {
    margin-bottom: 1rem;
    color: #333;
}

.policy-page ul {
    margin-left: 1.5rem;
}

/* --- Admin panel --- */

.admin-wrap {
    max-width: 1140px;
    margin: 1.5rem auto 3rem;
    padding: 0 1rem;
}

#login-view {
    max-width: 440px;
    margin: 2rem auto;
}

/* Admin Top Bar & Responsive Navigation Tabs */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav-tabs {
    display: flex;
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.05rem;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
    user-select: none;
    min-height: 42px;
}

.admin-tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.75);
}

.admin-tab-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.admin-tab-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    font-weight: 700;
}

.admin-tab-btn .tab-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.admin-tab-btn .tab-label {
    display: inline-block;
}

.admin-tab-btn .tab-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 12px;
    background: #e2e8f0;
    color: #475569;
    line-height: 1.2;
}

.admin-tab-btn.active .tab-badge {
    background: #eff6ff;
    color: #2563eb;
}

.admin-tab-btn .tab-badge-alert {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.admin-tab-pane {
    display: none;
    animation: adminFadeIn 0.15s ease-out;
}

.admin-tab-pane.active {
    display: block;
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-section-header h2,
.admin-section-header h3 {
    margin: 0;
}

.admin-quick-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-card label {
    display: block;
    margin: 1rem 0 0.35rem;
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

.admin-card input[type="text"],
.admin-card input[type="password"],
.admin-card select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.admin-hint {
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
}

.admin-error {
    background: #fdecea;
    color: #a12a2a;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.admin-test-result {
    margin-top: 0.4rem;
    line-height: 1.5;
}

.admin-test-loading {
    color: #4b5563;
    font-style: italic;
}

.admin-test-success {
    color: #1e7e34;
    font-weight: 500;
}

.admin-test-warning {
    color: #b45309;
    font-weight: 500;
}

.admin-test-error {
    display: inline-block;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.csv-drop-zone:hover,
.csv-drop-zone:focus {
    border-color: #667eea !important;
    background: #f8faff !important;
    outline: none;
}

.csv-drop-zone.dragover {
    border-color: #4f46e5 !important;
    background: #eef2ff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.csv-preview-row:hover {
    background-color: #f8fafc;
}

.csv-badge-valid {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.csv-badge-invalid {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.csv-badge-exist {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-btn-secondary {
    background: white;
    border: 1px solid #ccc;
    color: #555;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-btn-secondary:hover {
    background: #f5f5f5;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.admin-merchant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-merchant-row:last-child {
    border-bottom: none;
}

.admin-status {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.admin-status-active { background: #e3f7e8; color: #1e7e34; }
.admin-status-pending { background: #fff3cd; color: #8a6516; }
.admin-status-inactive { background: #f1f1f1; color: #777; }

.admin-field-group {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Multi-photo manager in the product form (admin/admin.js renders this
   markup dynamically). Reuses .product-image for every thumbnail so what
   an admin sees here is pixel-accurate to how the site will actually crop
   it -- same 3:2 ratio as the homepage grid and the product page gallery. */
.admin-photo-manager {
    margin: 0.5rem 0 0.25rem;
}

.admin-photo-cover {
    max-width: 240px;
    margin-bottom: 0.75rem;
}

.admin-photo-cover .product-image {
    border-radius: 6px;
}

.admin-photo-cover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.admin-photo-cover-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
}

/* Cover photo display-mode toggle. Mirrors exactly what the homepage card
   and the product page's main photo will do with this product's photos --
   changing it updates the cover preview above immediately. */
.admin-photo-fit-toggle {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.admin-photo-fit-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.82rem;
    cursor: pointer;
}

.admin-photo-fit-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.admin-photo-fit-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.admin-photo-gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
}

.admin-photo-thumb {
    position: relative;
    width: 90px;
}

.admin-photo-thumb-img.product-image {
    border-radius: 6px;
}

/* Gallery reorder thumbnails always crop-fill regardless of the fit-mode
   toggle above -- they're small navigation aids (same role as product.html's
   own thumbnail strip, which is always object-fit: cover), not the main
   view. The cover preview and the live site are what the toggle affects. */
.admin-photo-thumb-img.product-image img {
    object-fit: cover;
    background: none;
}

.admin-photo-thumb-controls {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.admin-photo-icon-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.admin-photo-icon-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #667eea;
    color: #667eea;
}

.admin-photo-icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.admin-photo-remove-x {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    line-height: 20px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}

.admin-photo-remove-x:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* "+ Add photo" tile -- doubles as the empty cover slot (larger, via
   .admin-photo-add-cover) and as the trailing tile in the gallery strip
   (90px, matching .admin-photo-thumb). Both trigger the hidden file input. */
.admin-photo-add {
    width: 90px;
    aspect-ratio: 3 / 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    color: #888;
    cursor: pointer;
}

.admin-photo-add:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f5f6fd;
}

.admin-photo-add span:first-child {
    font-size: 1.4rem;
    line-height: 1;
}

.admin-photo-add-label {
    font-size: 0.65rem;
    text-align: center;
    padding: 0 0.25rem;
}

.admin-photo-add-cover {
    width: 100%;
}

/* --- TipTap Rich-Text Editor --- */
.tiptap-editor-wrapper {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    min-height: 300px;
    overflow: hidden;
}

.tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-radius: 6px 6px 0 0;
}

.tiptap-toolbar-group {
    display: flex;
    gap: 0.25rem;
    padding: 0 0.25rem;
    border-right: 1px solid #ddd;
}

.tiptap-toolbar-group:last-child {
    border-right: none;
}

.tiptap-toolbar button {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.tiptap-toolbar button:hover {
    background: #f5f6fd;
    border-color: #667eea;
    color: #667eea;
}

.tiptap-toolbar button:active {
    background: #eef0fb;
}

.tiptap-editor {
    padding: 1rem;
    min-height: 250px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
}

.tiptap-editor > * + * {
    margin-top: 0.75em;
}

.tiptap-editor h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.tiptap-editor h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.tiptap-editor h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #444;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}

.tiptap-editor p {
    color: #333;
}

.tiptap-editor p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #aaa;
    pointer-events: none;
    height: 0;
}

.tiptap-editor ul, .tiptap-editor ol {
    padding-left: 1.5rem;
}

.tiptap-editor blockquote {
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: #555;
}

.tiptap-editor code {
    background: #f4f4f4;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: monospace;
}

.tiptap-editor pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.tiptap-editor pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    color: inherit;
}

.tiptap-editor .tiptap-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.tiptap-editor .tiptap-link {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tiptap-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.tiptap-editor td, .tiptap-editor th {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.tiptap-editor th {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
}

.tiptap-editor .selected-cell:after {
    z-index: 2;
    content: '';
    position: absolute;
    border: 2px solid #667eea;
    pointer-events: none;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: -2px;
}

.tiptap-editor hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

.tiptap-editor mark {
    background: #fff3cd;
    padding: 0.0625rem 0.1875rem;
    border-radius: 2px;
}

/* --- Image Editor Modal (Cropper.js) --- */
.image-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.image-editor-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.image-editor-panel {
    position: relative;
    background: white;
    border-radius: 8px;
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.image-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.image-editor-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.image-editor-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.image-editor-close:hover {
    background: #eee;
    color: #333;
}

.image-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.image-editor-toolbar-group {
    display: flex;
    gap: 0.35rem;
    padding: 0 0.5rem;
    border-right: 1px solid #ddd;
}

.image-editor-toolbar-group:last-child {
    border-right: none;
    margin-left: auto;
}

.image-editor-btn {
    padding: 0.4rem 0.65rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
    white-space: nowrap;
}

.image-editor-btn:hover {
    background: #f5f6fd;
    border-color: #667eea;
    color: #667eea;
}

.image-editor-btn:active {
    background: #eef0fb;
}

.image-editor-btn-primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.image-editor-btn-primary:hover {
    background: #764ba2;
    border-color: #764ba2;
    color: white;
}

.image-editor-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    overflow: auto;
    padding: 1rem;
}

.image-editor-canvas-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-editor-info {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 768px) {
    .image-editor-panel {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-editor-header {
        border-radius: 0;
    }
    
    .image-editor-toolbar {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .image-editor-toolbar-group {
        padding: 0 0.25rem;
    }
    
    .image-editor-btn {
            padding: 0.35rem 0.5rem;
            font-size: 0.8rem;
        }
    }

    /* --- Preview Modal --- */
    .preview-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: inherit;
    }

    .preview-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.75);
    }

    .preview-panel {
        position: relative;
        background: white;
        border-radius: 8px;
        width: 95%;
        max-width: 1200px;
        height: 90vh;
        max-height: 900px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        overflow: hidden;
    }

    .preview-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
        border-radius: 8px 8px 0 0;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .preview-header h3 {
        margin: 0;
        font-size: 1.1rem;
        color: #333;
    }

    .preview-mode-toggle {
        display: flex;
        gap: 0.25rem;
        background: white;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 0.25rem;
    }

    .preview-mode-btn {
        padding: 0.35rem 0.6rem;
        border: none;
        background: transparent;
        color: #666;
        font-size: 1rem;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.15s;
        line-height: 1;
    }

    .preview-mode-btn:hover {
        background: #f0f0f0;
        color: #333;
    }

    .preview-mode-btn.active {
        background: #667eea;
        color: white;
    }

    .preview-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #888;
        line-height: 1;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
    }

    .preview-close:hover {
        background: #eee;
        color: #333;
    }

    .preview-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1.5rem;
        background: #fafafa;
        border-bottom: 1px solid #eee;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .preview-status {
        font-size: 0.85rem;
        color: #666;
        font-weight: 500;
    }

    .preview-btn {
        padding: 0.4rem 0.75rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
        color: #555;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.15s;
    }

    .preview-btn:hover {
        background: #f5f6fd;
        border-color: #667eea;
        color: #667eea;
    }

    .preview-btn-primary {
        background: #667eea;
        border-color: #667eea;
        color: white;
    }

    .preview-btn-primary:hover {
        background: #764ba2;
        border-color: #764ba2;
        color: white;
    }

    .preview-frame-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #f0f0f0;
    }

    .preview-frame-wrapper iframe {
        flex: 1;
        width: 100%;
        border: none;
        background: white;
    }

    .preview-panel.mobile-mode .preview-frame-wrapper {
        max-width: 375px;
        margin: 0 auto;
        border-radius: 24px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
        border: 8px solid #222;
        border-radius: 24px;
    }

    @media (max-width: 768px) {
        .preview-panel {
            width: 100%;
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
        }
    
        .preview-header {
            border-radius: 0;
        }
    
        .preview-toolbar {
            padding: 0.5rem 1rem;
        }
    }

    @media (max-width: 480px) {
        .preview-panel.mobile-mode .preview-frame-wrapper {
            max-width: 100%;
            border-radius: 0;
            border: none;
            box-shadow: none;
        }
    }

    /* AliExpress Product Discovery & Selection Styles */
    .ae-product-card {
        border-radius: 6px;
        transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .ae-product-card:hover {
        background-color: #f8fafc !important;
    }

    .ae-item-checkbox {
        accent-color: #2563eb;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    #ae-select-all-checkbox {
        accent-color: #2563eb;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    #ae-selection-toolbar {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    #ae-prev-page-btn:disabled,
    #ae-next-page-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Auto-Fit Category Batch Ingestion Styles */
    #ae-autofit-progress-bar.running {
        background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
        background-size: 24px 24px;
        animation: progress-bar-stripes 1s linear infinite;
    }

    @keyframes progress-bar-stripes {
        from { background-position: 24px 0; }
        to { background-position: 0 0; }
    }

    .autofit-badge-ready { background: #e2e8f0 !important; color: #475569 !important; }
    .autofit-badge-running { background: #dbeafe !important; color: #1d4ed8 !important; }
    .autofit-badge-completed { background: #dcfce7 !important; color: #15803d !important; }
    .autofit-badge-failed { background: #fee2e2 !important; color: #b91c1c !important; }
    .autofit-badge-cancelled { background: #fef3c7 !important; color: #b45309 !important; }
    .autofit-badge-partially { background: #e0e7ff !important; color: #4338ca !important; }

    /* Admin Catalog Management & Modals */
    @keyframes modalPop {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .admin-catalog-toolbar input:focus,
    .admin-catalog-toolbar select:focus {
        border-color: #2563eb !important;
        outline: none;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    }

    /* Catalog Date Badges & Filter Styles */
    .catalog-date-pill {
        transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
        user-select: none;
    }

    .catalog-date-upload:hover {
        background-color: #dcfce7 !important;
        border-color: #86efac !important;
        transform: translateY(-1px);
        box-shadow: 0 1px 3px rgba(22, 101, 52, 0.12);
    }

    .catalog-date-filter-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.15s ease;
    }

    .catalog-date-filter-wrapper input[type="date"]::-webkit-calendar-picker-indicator:hover {
        opacity: 1;
    }

/* --- Floating Scroll to Top Button --- */
.scroll-to-top-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4), 0 2px 6px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.9);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease,
                box-shadow 0.2s ease;
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.scroll-to-top-btn:active {
    transform: translateY(0) scale(0.95);
    background-color: #1e40af;
}

.scroll-to-top-btn:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

