        /*
         * ecards.css — eCard page-specific styles
         * =========================================
         * Site-wide base styles (CSS variables, body, reset, navbar, mobile
         * menu, footer, .btn-cozy, utilities) are provided by site-base.css,
         * which must be loaded before this file.
         *
         * Rules in this file that mirror site-base.css are intentional
         * overrides (e.g. .text-highlight, .nav-link:hover use --primary
         * rather than --theme-rose for the eCards page colour scheme).
         */

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Nunito', sans-serif;
            background:
                radial-gradient(circle at 12% 12%, rgba(255, 227, 208, 0.8), transparent 28%),
                radial-gradient(circle at 88% 18%, rgba(255, 241, 201, 0.7), transparent 24%),
                linear-gradient(145deg, #f5e0e7 0%, #d9e5f4 46%, #f8ecdf 100%);
            background-attachment: fixed;
            color: var(--text-dark);
            overflow-x: hidden;
            width: 100%;
            line-height: 1.5;
            padding-top: var(--nav-height);
            min-height: 100vh;
            transition: background 400ms ease, color 250ms ease;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
            opacity: 0.025;
            pointer-events: none;
            z-index: 0;
        }

        a {
            text-decoration: none;
            color: inherit;
            transition: color 0.2s;
        }

        button {
            background: none;
            border: none;
            cursor: pointer;
            font-family: inherit;
        }

        img {
            max-width: 100%;
            display: block;
        }

        .container {
            max-width: var(--container-width);
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        .flex {
            display: flex;
        }

        .flex-col {
            flex-direction: column;
        }

        .justify-between {
            justify-content: space-between;
        }

        .items-center {
            align-items: center;
        }

        .hidden {
            display: none !important;
        }
        .reveal-with-categories { display: none !important; }

        .w-full {
            width: 100%;
        }

        .grid {
            display: grid;
        }

        .grid-cols-1 {
            grid-template-columns: repeat(1, minmax(0, 1fr));
        }

        .gap-4 {
            gap: 1rem;
        }

        .mb-6 {
            margin-bottom: 1.5rem;
        }

        .font-hand {
            font-family: 'Caveat', cursive;
        }

        .font-bold {
            font-weight: 700;
        }

        .text-sm {
            font-size: 0.875rem;
        }

        .text-highlight {
            color: var(--primary);
        }

        .text-center {
            text-align: center;
        }

        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 50;
            background: var(--bg-mica);
            border-bottom: 1px solid var(--border-subtle);
            backdrop-filter: blur(40px) saturate(180%);
            -webkit-backdrop-filter: blur(40px) saturate(180%);
            height: var(--nav-height);
            display: flex;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.04);
        }

        .nav-logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            text-decoration: none;
        }

        .logo-circle {
            width: 3rem;
            height: 3rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--white);
            transition: all var(--transition-normal);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
            flex-shrink: 0;
        }

        .nav-logo:hover .logo-circle {
            transform: rotate(12deg) scale(1.05);
            box-shadow: var(--shadow-card-hover);
        }

        .logo-text {
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1.1;
            color: var(--text-main);
            white-space: nowrap;
        }

        .logo-sub {
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #9ca3af;
            display: block;
            margin-top: 0.15rem;
        }

        .nav-links {
            display: none;
            gap: 1.25rem;
            font-weight: 600;
            color: #4b5563;
        }

        .nav-link {
            position: relative;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            font-size: 0.875rem;
            padding: 0.5rem 0.75rem;
            border-radius: var(--radius-sm);
            transition: all var(--transition-fast);
        }

        .nav-link.nav-link--active {
            color: var(--primary);
        }

        .nav-link.nav-link--active::after {
            transform: scaleX(1);
            transform-origin: bottom left;
        }

        .nav-link:hover {
            color: var(--primary);
            background: rgba(230, 126, 115, 0.08);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: calc(100% - 1.5rem);
            height: 2px;
            bottom: 0;
            left: 0.75rem;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            transform: scaleX(0);
            transform-origin: bottom right;
            transition: transform var(--transition-normal);
            border-radius: 2px;
        }

        .nav-link:hover::after {
            transform: scaleX(1);
            transform-origin: bottom left;
        }

        .menu-toggle {
            display: block;
            color: #4b5563;
            padding: 0.5rem;
            border-radius: var(--radius-sm);
            transition: all var(--transition-fast);
        }

        .menu-toggle:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        .mobile-menu {
            overflow: hidden;
            background: var(--bg-acrylic);
            backdrop-filter: blur(40px) saturate(180%);
            -webkit-backdrop-filter: blur(40px) saturate(180%);
            border-bottom: 1px solid var(--border-subtle);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
            transition: all var(--transition-smooth);
            max-height: 0;
            opacity: 0;
            visibility: hidden;
            padding: 0 1.5rem;
            margin-top: var(--nav-height);
            position: fixed;
            width: 100%;
            z-index: 40;
            left: 0;
            top: 0;
        }

        .mobile-menu.open {
            max-height: min(calc(100vh - var(--nav-height)), 600px);
            overflow-y: auto;
            opacity: 1;
            visibility: visible;
            padding-top: 1.5rem;
            padding-bottom: 2.5rem;
        }

        .mobile-link {
            display: block;
            font-size: 1.25rem;
            font-weight: 700;
            font-family: 'Caveat', cursive;
            margin-bottom: 1rem;
            color: var(--text-main);
            text-decoration: none;
            transition: all var(--transition-fast);
            border-radius: var(--radius-sm);
            padding: 0.5rem 0.75rem;
            margin-left: -0.75rem;
        }

        .mobile-link:hover {
            background: rgba(0, 0, 0, 0.04);
            color: var(--primary);
        }

        .mobile-link--active {
            color: var(--primary);
            border-left: 3px solid var(--primary);
            padding-left: calc(0.75rem - 3px);
        }

        /* Card footer - price and action */
        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            margin-top: auto;
            padding-top: 0.5rem;
        }

        .catalogue-rail {
            margin-top: 2rem;
        }

        .catalogue-rail-head {
            display: flex;
            align-items: end;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 2rem;
            margin-bottom: 1rem;
        }

        .catalogue-rail-head h3 {
            margin: 0;
            font-size: 1.9rem;
            color: var(--text-primary);
        }

        .catalogue-rail-head p {
            margin: 0.35rem 0 0;
            color: var(--text-secondary);
        }

        .featured-collection-card {
            display: grid;
            grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
            gap: 1.25rem;
            padding: 1.5rem;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(255, 255, 255, 0.8);
            background: linear-gradient(135deg, rgba(255, 247, 244, 0.96) 0%, rgba(240, 245, 255, 0.92) 100%);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
            cursor: pointer;
            transition: transform var(--transition-normal), box-shadow var(--transition-normal);
        }

        .featured-collection-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
        }

        .featured-collection-copy {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 0.75rem;
        }

        .featured-collection-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.75rem;
            border-radius: 999px;
            background: rgba(230, 126, 115, 0.12);
            color: var(--primary);
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .featured-collection-copy h4 {
            margin: 0;
            font-size: clamp(1.9rem, 3vw, 2.7rem);
            color: var(--text-primary);
        }

        .featured-collection-copy p {
            margin: 0;
            color: var(--text-secondary);
            line-height: 1.6;
            text-align: left;
        }

        .featured-collection-meta {
            font-size: 0.95rem;
            color: var(--text-dark);
            opacity: 0.8;
        }

        .featured-collection-preview {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.75rem;
        }

        .featured-collection-preview img {
            width: 100%;
            aspect-ratio: 4 / 3;
            object-fit: cover;
            border-radius: var(--radius-md);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            background: rgba(255, 255, 255, 0.75);
        }

        .card-date-added {
            width: 100%;
            margin: 0.25rem 0 0;
            font-size: 0.82rem;
            color: var(--text-dark);
            opacity: 0.72;
            text-align: left;
        }

        body::after {
            background:
                radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.5), transparent 22%),
                radial-gradient(circle at 74% 12%, rgba(255, 244, 214, 0.4), transparent 18%);
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            opacity: 0.65;
        }

        .catalogue-rail-head h3,
        .featured-collection-copy h4 {
            font-family: 'Dancing Script', cursive;
            letter-spacing: 0.01em;
            color: #633b46;
        }

        .catalogue-rail-head h3 {
            transition: color 250ms ease, letter-spacing 250ms ease, transform 250ms ease;
        }

        .catalogue-rail-head p {
            max-width: 42rem;
        }

        .featured-collection-card {
            position: relative;
            overflow: hidden;
            transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal);
            background: linear-gradient(135deg, rgba(255, 249, 246, 0.96) 0%, rgba(253, 241, 233, 0.94) 100%);
            border-color: rgba(209, 151, 138, 0.35);
            box-shadow: 0 22px 48px rgba(125, 73, 92, 0.16);
        }

        .featured-collection-card::after {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            opacity: 0.75;
            background: radial-gradient(circle at top right, rgba(255, 228, 196, 0.45), transparent 36%);
        }

        #ecards-categories-view .category-card,
        #postcard-categories-view .category-card {
            isolation: isolate;
        }

        #ecards-categories-view .category-content,
        #postcard-categories-view .category-content {
            transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal);
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.97) 0%, rgba(247, 235, 241, 0.92) 100%);
            border-color: rgba(222, 187, 176, 0.45);
            box-shadow: 0 14px 34px rgba(137, 89, 106, 0.14);
        }

        #ecards-categories-view .cat-icon,
        #postcard-categories-view .cat-icon {
            width: 5.4rem;
            height: 5.4rem;
            display: grid;
            place-items: center;
            margin-bottom: 1.15rem;
            border-radius: 50%;
            font-size: 2.8rem;
            background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), rgba(252, 227, 216, 0.88));
            box-shadow: 0 10px 24px rgba(215, 145, 129, 0.28);
            color: #8f4e5c;
        }

        @media (max-width: 768px) {
            .featured-collection-card {
                grid-template-columns: 1fr;
            }

            .featured-collection-preview {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        /* -- Related cards strip ----------------------------------------------- */
        .related-cards-section {
            margin-top: 2.5rem;
            padding-top: 2rem;
            border-top: 1px dashed var(--border-subtle);
        }
        .related-cards-section h4 {
            font-size: 1.5rem;
            margin-bottom: 1.25rem;
            color: var(--text-primary);
        }
        .related-cards-strip {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
        }
        .related-card-tile {
            cursor: pointer;
            border-radius: var(--radius-lg);
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-card);
            overflow: hidden;
            transition: transform 200ms ease, box-shadow 200ms ease;
            text-align: center;
            padding: 0.75rem 0.75rem 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .related-card-tile:hover {
            transform: translateY(-3px) rotate(-1deg);
            box-shadow: var(--shadow-card-hover);
        }
        .related-card-tile img {
            width: 100%;
            height: 130px;
            object-fit: contain;
            border-radius: var(--radius-md);
            margin-bottom: 0.5rem;
        }
        .related-card-tile .rel-title {
            font-family: 'Caveat', cursive;
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
            margin-bottom: 0.4rem;
            flex: 1;
        }
        .related-card-tile .rel-btn {
            font-size: 0.75rem;
            color: var(--primary);
            border: 1.5px solid var(--primary);
            border-radius: 6px;
            padding: 0.2rem 0.6rem;
            background: transparent;
            cursor: pointer;
            font-weight: 700;
            transition: background 150ms, color 150ms;
            margin-top: 0.25rem;
        }
        .related-card-tile:hover .rel-btn {
            background: var(--primary);
            color: white;
        }
        @media (max-width: 768px) {
            .related-cards-strip { grid-template-columns: repeat(2, 1fr); }
        }

        .card-price {
            display: none;
        }

        .btn-customize {
            background: transparent;
            color: var(--primary);
            border: 1.5px solid var(--primary);
            border-radius: 6px;
            padding: 0.35rem 0.75rem;
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-fast);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .btn-customize:hover {
            background: var(--primary);
            color: white;
        }

        .category-card:hover .btn-customize {
            background: var(--primary);
            color: white;
        }

        .btn-share-card {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: 1.5px solid var(--border-default, #ddd);
            background: transparent;
            color: var(--text-muted, #6b7280);
            cursor: pointer;
            transition: all var(--transition-fast);
            margin-left: 0.25rem;
            flex-shrink: 0;
        }

        .btn-share-card:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            transform: scale(1.1);
        }

        /* Share bar in customize view */
        .card-share-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            margin: 0.75rem auto 1rem;
            padding: 0.5rem 1rem;
            background: var(--bg-card, #f9fafb);
            border: 1px solid var(--border-default, #e5e7eb);
            border-radius: 0.5rem;
            max-width: 360px;
        }
        .card-share-bar__link {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.85rem;
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }
        .card-share-bar__link:hover { text-decoration: underline; }
        .card-share-bar__copy {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.8rem;
            padding: 0.3rem 0.6rem;
            border: 1px solid var(--border-default, #ddd);
            border-radius: 0.35rem;
            background: white;
            color: var(--text-muted, #6b7280);
            cursor: pointer;
            transition: all var(--transition-fast);
        }
        .card-share-bar__copy:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .btn-back {
            cursor: pointer;
            background: none;
            border: none;
            font-size: 1rem;
            transition: all var(--transition-fast);
        }

        .btn-back:hover {
            color: var(--primary);
        }

        .btn-outline {
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border-default);
            color: var(--text-dark);
            border-radius: var(--radius-xl);
            padding: 0.75rem 2rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all var(--transition-normal);
            box-shadow: var(--shadow-card);
        }

        .btn-outline:hover {
            background: rgba(255, 255, 255, 0.95);
            transform: translateY(-2px);
            box-shadow: var(--shadow-card-hover);
        }

        .custom-form {
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 2rem;
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
        }

        .form-input,
        .form-textarea {
            width: 100%;
            padding: 0.85rem 1rem;
            border: 1px solid var(--border-default);
            border-radius: var(--radius-md);
            font-family: 'Nunito', sans-serif;
            background: rgba(255, 255, 255, 0.8);
            margin-bottom: 1rem;
            display: block;
            transition: all var(--transition-fast);
        }

        .form-input:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(230, 126, 115, 0.15);
        }

        /* Address Book Dropdown */
        .input-with-dropdown {
            position: relative;
        }

        .contacts-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid var(--border-default);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-elevated);
            max-height: 200px;
            overflow-y: auto;
            z-index: 100;
            display: none;
        }

        .contacts-dropdown.show {
            display: block;
        }

        .contacts-dropdown-item {
            padding: 0.75rem 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-bottom: 1px solid var(--border-subtle);
            transition: background var(--transition-fast);
        }

        .contacts-dropdown-item:last-child {
            border-bottom: none;
        }

        .contacts-dropdown-item:hover {
            background: var(--gray-100);
        }

        .contacts-dropdown-item .contact-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.75rem;
            font-weight: 600;
            flex-shrink: 0;
        }

        .contacts-dropdown-item .contact-info {
            flex: 1;
            min-width: 0;
        }

        .contacts-dropdown-item .contact-name {
            font-weight: 600;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contacts-dropdown-item .contact-email {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contacts-dropdown-empty {
            padding: 1rem;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        /* Magic Message Feature */
        .magic-message-bar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            flex-wrap: wrap;
        }

        .magic-message-bar select {
            padding: 0.5rem 0.75rem;
            border: 1px solid var(--border-default);
            border-radius: var(--radius-sm);
            font-family: inherit;
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.9);
            cursor: pointer;
            min-width: 120px;
        }

        .magic-message-bar select:focus {
            outline: none;
            border-color: var(--primary);
        }

        .btn-magic {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 1rem;
            background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
            color: white;
            border: none;
            border-radius: var(--radius-sm);
            font-family: inherit;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-fast);
            box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
        }

        .btn-magic:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
        }

        .btn-magic:active {
            transform: translateY(0);
        }

        .btn-magic i {
            width: 16px;
            height: 16px;
        }

        .magic-message-hint {
            font-size: 0.75rem;
            color: #6b7280;
            margin-left: auto;
        }

        @media (max-width: 640px) {
            .magic-message-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 0.5rem;
            }

            .magic-message-bar select {
                width: 100%;
            }

            .btn-magic {
                width: 100%;
                justify-content: center;
            }

            .magic-message-hint {
                margin-left: 0;
                text-align: center;
            }
        }

        /* Mobile: 1 column grid for categories and cards */
        .sub-gallery-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .category-card {
            position: relative;
            cursor: pointer;
            min-height: 350px;
            transition: transform var(--transition-normal);
        }

        /* Playful hover rotation */
        .category-card:nth-child(odd):not(.disabled):hover {
            transform: rotate(-2deg) scale(1.03);
        }

        .category-card:nth-child(even):not(.disabled):hover {
            transform: rotate(2deg) scale(1.03);
        }

        /* Mothers Day category – subtle shine to draw attention */
        .category-card-mothers-day {
            overflow: hidden;
        }
        .category-card-mothers-day::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 60%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
            pointer-events: none;
            z-index: 2;
            animation: category-shine 3s ease-in-out infinite;
        }
        @keyframes category-shine {
            to { left: 150%; }
        }

        .category-bg {
            position: absolute;
            inset: 0;
            opacity: 0;
            transition: all var(--transition-normal);
            pointer-events: none;
            border-radius: var(--radius-lg);
        }

        .category-card:hover .category-bg {
            opacity: 0.1;
            transform: scale(1.02);
        }

        .category-content {
            position: relative;
            background: rgba(255, 255, 255, 0.65);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 3rem 1.5rem;
            border: 1px solid rgba(255, 255, 255, 0.8);
            border-top: 1px solid rgba(255, 255, 255, 1);
            border-radius: var(--radius-lg);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            height: 100%;
            transition: all var(--transition-normal);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
            overflow: hidden;
        }

        .category-content::before { display: none; }
        .category-content::after { display: none; }

        .category-card:not(.disabled):hover .category-content {
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
            border-color: rgba(255, 255, 255, 0.9);
        }

        .category-card:not(.disabled):hover .category-content::before {
            display: none;
        }

        .cat-icon {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            transition: all var(--transition-normal);
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
            position: relative;
            z-index: 3;
        }

        .category-card:hover .cat-icon {
            transform: scale(1.15) rotate(-5deg);
        }

        .ecards-mobile-catalogue {
            display: none;
            margin-top: 1.5rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-catalogue-shell {
            display: grid;
            gap: 1.5rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-catalogue-section {
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.96) 0%, rgba(247, 235, 241, 0.92) 100%);
            border: 1px solid rgba(222, 187, 176, 0.45);
            border-radius: var(--radius-xl);
            box-shadow: 0 16px 36px rgba(137, 89, 106, 0.14);
            padding: 1.1rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-catalogue-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.9rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

        .mobile-catalogue-head h3,
        .mobile-rail-heading h4 {
            margin: 0;
            color: var(--theme-plum);
            font-family: 'Nunito', sans-serif;
            font-weight: 900;
            letter-spacing: 0.015em;
            line-height: 1.15;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
        }

        .mobile-catalogue-head p,
        .mobile-rail-heading p {
            margin: 0.2rem 0 0;
            color: rgba(79, 54, 64, 0.78);
            font-size: 0.88rem;
            line-height: 1.45;
        }

        .mobile-swipe-hint {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            color: #7c2d12;
            font-weight: 900;
            white-space: nowrap;
            padding: 0.42rem 0.78rem;
            border-radius: 999px;
            border: 1px solid rgba(209, 151, 138, 0.42);
            background: rgba(255, 249, 246, 0.92);
            box-shadow: 0 8px 18px rgba(137, 89, 106, 0.10);
            letter-spacing: 0.02em;
        }

        .mobile-featured-strip,
        .mobile-rail-track,
        .mobile-chip-row {
            display: flex;
            gap: 0.85rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x proximity;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            scrollbar-width: thin;
            scrollbar-color: rgba(185, 128, 138, 0.45) transparent;
        }

        .mobile-featured-strip::-webkit-scrollbar,
        .mobile-rail-track::-webkit-scrollbar,
        .mobile-chip-row::-webkit-scrollbar {
            height: 8px;
        }

        .mobile-featured-strip::-webkit-scrollbar-thumb,
        .mobile-rail-track::-webkit-scrollbar-thumb,
        .mobile-chip-row::-webkit-scrollbar-thumb {
            background: rgba(185, 128, 138, 0.45);
            border-radius: 999px;
        }

        .mobile-featured-card,
        .mobile-rail-card {
            scroll-snap-align: start;
            flex: 0 0 auto;
            cursor: pointer;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(209, 151, 138, 0.34);
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.98) 0%, rgba(247, 235, 241, 0.9) 100%);
            box-shadow: 0 14px 32px rgba(137, 89, 106, 0.12);
            overflow: hidden;
        }

        .mobile-featured-card {
            width: min(84vw, 320px);
        }

        .mobile-rail-card {
            width: min(72vw, 248px);
        }

        .mobile-featured-thumb,
        .mobile-rail-thumb {
            background: linear-gradient(180deg, rgba(255, 248, 244, 0.98) 0%, rgba(246, 231, 238, 0.92) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .mobile-featured-thumb {
            height: 240px;
        }

        .mobile-rail-thumb {
            height: 190px;
        }

        .mobile-featured-thumb img,
        .mobile-rail-thumb img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .mobile-featured-copy,
        .mobile-rail-copy {
            padding: 0.95rem 0.95rem 1rem;
        }

        .mobile-featured-copy h4,
        .mobile-rail-copy h5 {
            margin: 0;
            color: var(--theme-ink);
            line-height: 1.25;
            font-weight: 800;
            letter-spacing: 0.01em;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
        }

        .mobile-featured-copy h4 {
            font-size: 1.2rem;
        }

        .mobile-rail-copy h5 {
            font-size: 1rem;
        }

        .mobile-featured-copy p,
        .mobile-rail-meta {
            margin: 0.4rem 0 0;
            font-size: 0.82rem;
            color: rgba(79, 54, 64, 0.76);
            line-height: 1.4;
        }

        .mobile-featured-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            border-radius: 999px;
            padding: 0.28rem 0.72rem;
            background: rgba(217, 137, 128, 0.12);
            border: 1px solid rgba(209, 151, 138, 0.35);
            color: var(--theme-rose);
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.7rem;
        }

        .mobile-chip-row {
            gap: 0.65rem;
            padding-bottom: 0.15rem;
        }

        .mobile-chip {
            flex: 0 0 auto;
            scroll-snap-align: start;
            min-height: 44px;
            padding: 0.7rem 1rem;
            border-radius: 999px;
            border: 1px solid rgba(209, 151, 138, 0.35);
            background: rgba(255, 251, 248, 0.86);
            color: var(--theme-ink);
            font-size: 0.88rem;
            font-weight: 900;
            letter-spacing: 0.012em;
            transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
        }

        .mobile-chip:hover,
        .mobile-chip:focus-visible {
            background: rgba(217, 137, 128, 0.12);
            color: var(--theme-rose);
            border-color: rgba(209, 151, 138, 0.58);
            outline: none;
        }

        .mobile-rails {
            display: grid;
            gap: 1rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-rail-section {
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.96) 0%, rgba(247, 235, 241, 0.9) 100%);
            border: 1px solid rgba(222, 187, 176, 0.42);
            border-radius: var(--radius-xl);
            padding: 1rem;
            box-shadow: 0 14px 32px rgba(137, 89, 106, 0.12);
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-rail-head {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.9rem;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

        .mobile-rail-heading {
            min-width: 0;
            max-width: 100%;
            flex: 1 1 auto;
        }

        .mobile-view-all {
            flex: 0 0 auto;
            min-height: 44px;
            padding: 0.65rem 0.95rem;
            border-radius: 999px;
            border: 1px solid rgba(209, 151, 138, 0.45);
            background: rgba(255, 251, 248, 0.88);
            color: var(--theme-rose);
            font-weight: 700;
            font-size: 0.82rem;
        }

        .mobile-view-all:hover,
        .mobile-view-all:focus-visible,
        .mobile-rail-action:hover,
        .mobile-rail-action:focus-visible {
            background: linear-gradient(135deg, #d98980, #b96872);
            color: #fff;
            border-color: transparent;
            outline: none;
        }

        .mobile-rail-action {
            margin-top: 0.75rem;
            width: 100%;
            min-height: 44px;
            border-radius: 999px;
            border: 1px solid rgba(209, 151, 138, 0.45);
            background: rgba(255, 251, 248, 0.88);
            color: var(--theme-rose);
            font-weight: 700;
            font-size: 0.82rem;
        }

        .mobile-catalogue-empty {
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.96) 0%, rgba(247, 235, 241, 0.92) 100%);
            border: 1px solid rgba(222, 187, 176, 0.45);
            border-radius: var(--radius-xl);
            box-shadow: 0 16px 36px rgba(137, 89, 106, 0.14);
            padding: 1.25rem;
            text-align: center;
            color: rgba(79, 54, 64, 0.8);
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .mobile-catalogue-empty p {
            margin: 0;
            line-height: 1.5;
        }

        .mobile-catalogue-empty button {
            margin-top: 0.9rem;
        }

        .grid-img-box {
            width: 100%;
            height: 220px;
            margin-bottom: 1rem;
            border-radius: var(--radius-md);
            overflow: hidden;
            background: #fff;
            position: relative;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .grid-img-box::before { display: none; }
        .grid-img-box::after { display: none; }

        .grid-img-box img {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Ensure text content appears above glass effect */
        .category-content h3,
        .category-content p,
        .category-content .flex,
        .category-content button {
            position: relative;
            z-index: 3;
        }

        /* Mobile: Default to single column, then tablet/desktop adjustments */
        .customize-container {
            display: grid;
            gap: 3rem;
            grid-template-columns: 1fr;
        }

        .app-view {
            padding-top: 2rem;
            padding-bottom: 2rem;
            position: relative;
            z-index: 1;
        }

        /* -- Ad slots --------------------------------------------------- */
        .ad-slot {
            margin: 0 auto;
            display: block;
        }
        .ad-slot--rect { max-width: 300px; }

        .card-mockup-wrapper.type-ecard {
            min-height: 500px;
            max-height: 80vh;
            /* Reduced min-height for small phones */
            overflow: hidden;
            perspective: 2000px;
            width: 100%;
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            background-size: cover;
            background-position: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-card);
            transition: background 0.3s;
        }

        .preview-header {
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: max-content;
            max-width: calc(100% - 24px);
            text-align: center;
            z-index: 40;
            font-family: 'Varela Round', sans-serif;
            font-size: 1rem;
            line-height: 1.5;
            color: #1a1a1a;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
            pointer-events: none;
            padding: 6px 14px;
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.9);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        }

        /* To/From header spans � two-line layout on all screen sizes */
        .hdr-sep {
            display: none;
        }

        .hdr-to {
            display: block;
        }

        .hdr-from {
            display: block;
        }

        .perspective-container {
            perspective: 2000px;
            width: 100%;
            flex-grow: 1;
            min-height: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 20;
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .perspective-container.pan-left {
            transform: translateX(50%);
        }

        .perspective-container.pan-right {
            transform: translateX(-50%);
        }

        .mobile-hidden {
            opacity: 0 !important;
            pointer-events: none;
        }

        .book-stage {
            width: 400px;
            height: 550px;
            /* position:absolute takes the stage out of layout flow so that
               transform:scale() shrinking it via autoScale does not leave a
               550px-tall layout hole that forces the container to overflow
               and get clipped � same pattern used in view.html. */
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -275px; /* -(height/2) */
            margin-left: -200px; /* -(width/2) */
            transform-style: preserve-3d;
            transition: transform 0.7s;
            will-change: transform;
            z-index: 20;
        }

        .book-spine {
            position: absolute;
            inset: 0;
            transform-style: preserve-3d;
            transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: left center;
            will-change: transform;
        }

        .book-spine.spread {
            transform: translateX(50%);
        }

        .book-spine.view-back {
            transform: translateX(100%) rotateY(-180deg);
        }

        .leaf-right-base {
            position: absolute;
            inset: 0;
            transform-style: preserve-3d;
            z-index: 0;
        }

        .leaf-right-base.z-index-fix {
            z-index: 20 !important;
        }

        .book-spine.view-back .leaf-right-base {
            z-index: 20;
        }

        .leaf-left-flip {
            position: absolute;
            inset: 0;
            transform-style: preserve-3d;
            transform-origin: left center;
            transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 10;
            will-change: transform;
        }

        .leaf-left-flip.flipped {
            transform: rotateY(-180deg);
        }

        .page-face {
            position: absolute;
            inset: 0;
            backface-visibility: hidden;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.02);
            background: var(--white);
            transition: opacity 1s ease, box-shadow 0.4s ease-out;
        }

        /* Dynamic shadow during flip for depth effect */
        .leaf-left-flip.flipped .page-face {
            box-shadow: -8px 4px 16px -2px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.02);
        }

        .page-front {
            border-radius: 0 8px 8px 0;
            z-index: 2;
        }

        .page-back {
            transform: rotateY(180deg);
            border-radius: 8px 0 0 8px;
            z-index: 1;
        }

        .page-static {
            border-radius: 0 8px 8px 0;
            z-index: 1;
        }

        .page-back-cover {
            transform: rotateY(180deg);
            border-radius: 8px 0 0 8px;
            z-index: 0;
        }

        .page-face img {
            width: 100%;
            height: 100%;
            object-fit: fill !important;
            display: block;
        }

        .viewer-message {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 80%;
            color: #222;
            white-space: pre-wrap;
            text-align: center;
            font-family: 'Varela Round', sans-serif;
            font-size: 1.8rem;
            text-shadow: 0 1px 2px rgba(255, 255, 255, .85);
            pointer-events: none;
            z-index: 10;
        }

        .mockup-controls {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
            background: var(--bg-acrylic);
            backdrop-filter: blur(20px);
            padding: 0.5rem;
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-card);
            border: 1px solid var(--border-subtle);
            z-index: 30;
            position: relative;
            flex-shrink: 0;
        }

        .viewer-tab {
            padding: 0.5rem 1.5rem;
            border-radius: var(--radius-xl);
            font-weight: 700;
            font-size: 0.875rem;
            color: var(--text-muted);
            transition: all var(--transition-normal);
        }

        .viewer-tab:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        .viewer-tab.active {
            background: linear-gradient(135deg, var(--primary), #d16a60);
            color: var(--white);
            box-shadow: 0 4px 12px rgba(230, 126, 115, 0.35);
        }

        @media (min-width: 768px) and (max-width: 1023px) {
            .mockup-controls {
                gap: 0.3rem;
                padding: 0.35rem;
                max-width: calc(100% - 16px);
                justify-content: center;
            }

            .viewer-tab {
                padding: 0.4rem 0.7rem;
                font-size: 0.78rem;
                white-space: nowrap;
                flex: 0 1 auto;
                min-width: 0;
            }

            .nav-arrow {
                width: 28px !important;
                height: 28px !important;
                min-width: 28px !important;
                flex: 0 0 28px !important;
                font-size: 14px !important;
            }
        }

        /* ================================================================ */
        /* PORTRAIT TABLET/MOBILE: Disable flipbook animation � one page at a time */
        /* Landscape and desktop are NOT affected.                                 */
        /* ================================================================ */
        @media screen and (max-width: 1023px) and (orientation: portrait) {

            /* Reduce wrapper height so the card fits comfortably on small phones.
               The book-stage is position:absolute so it doesn't push this height �
               autoScale will shrink the stage to fit whatever height we give here. */
            .card-mockup-wrapper.type-ecard {
                min-height: 370px;
                max-height: min(80vh, 500px);
            }

            /* Remove 3D perspective so no depth / flip is rendered */
            .perspective-container {
                perspective: none !important;
            }

            .book-stage {
                transform-style: flat !important;
            }

            /* Spine and all structural leaves: flat, stacked, no transitions */
            .book-spine,
            .book-spine.spread,
            .book-spine.view-back {
                transform: none !important;
                transition: none !important;
                transform-style: flat !important;
                position: absolute !important;
                inset: 0 !important;
            }

            .leaf-right-base,
            .leaf-left-flip,
            .leaf-left-flip.flipped {
                transform: none !important;
                transition: none !important;
                transform-style: flat !important;
                position: absolute !important;
                inset: 0 !important;
            }

            /* All page faces: visible, stacked on top of each other, hidden by default.
               !important overrides backface-visibility:hidden and rotateY transforms
               on .page-back and .page-back-cover defined in the base rules. */
            .page-face {
                backface-visibility: visible !important;
                transform: none !important;
                border-radius: 8px !important;
                position: absolute !important;
                inset: 0 !important;
                display: none !important;
                transition: none !important;
            }

            /* Show only the currently active page */
            .page-face.portrait-visible {
                display: block !important;
            }

            /* ---- Tabs / controls bar ---- */
            /* Tighten the pill bar so all 4 tabs + arrows fit without wrapping */
            .mockup-controls {
                gap: 0.2rem !important;
                padding: 0.3rem !important;
                max-width: calc(100% - 16px) !important;
            }

            .viewer-tab {
                padding: 0.35rem 0.55rem !important;
                font-size: 0.72rem !important;
                white-space: nowrap !important;
            }

            /* Shrink the inline-styled arrow buttons */
            .nav-arrow {
                width: 26px !important;
                height: 26px !important;
                min-width: 26px !important;
                font-size: 13px !important;
                flex-shrink: 0 !important;
            }

            /* ---- To / From header ---- */
            /* Portrait: hide the bullet and block .hdr-to so From: wraps to a new line */
            .preview-header {
                font-size: 0.8rem !important;
                line-height: 1.5 !important;
                top: 6px !important;
                padding: 0 14px !important;
                color: #444 !important;
                text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9) !important;
                letter-spacing: 0.01em !important;
            }

        }

        /* ================================================================ */
        /* LANDSCAPE MOBILE: Fix oversized To/From header                   */
        /* Targets phones in landscape (short viewport, not tablets/desktop) */
        /* ================================================================ */
        @media screen and (max-width: 900px) and (orientation: landscape) {
            .preview-header {
                font-size: 0.8rem !important;
                line-height: 1.5 !important;
                top: 6px !important;
                padding: 0 14px !important;
                color: #444 !important;
                text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9) !important;
                letter-spacing: 0.01em !important;
            }

        }

        /* Mobile: Single column for checkout */
        .checkout-layout {
            display: grid;
            gap: 2rem;
            grid-template-columns: 1fr;
        }

        .summary-card {
            background: #ffffff;
            position: relative;
            padding: 2.5rem;
            border-radius: 4px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            border: 1px solid #e5e7eb;
            max-width: 100%;
            overflow: hidden;
        }

        /* Order Summary thumbnail (avoid relying on utility classes)
           This is intentionally scoped to checkout view so it cannot affect flipbook layout/animation. */
        #checkout-view #summary-thumb-wrap {
            width: 80px;
            height: 96px;
            background: #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            flex: 0 0 auto;
        }

        #checkout-view #summary-thumb,
        #checkout-view #summary-thumb-photo {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        #checkout-view #summary-thumb-photo.hidden {
            display: none !important;
        }

        .summary-card::after {
            content: "";
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 100%;
            height: 20px;
            background: radial-gradient(circle, transparent 70%, #ffffff 75%) 0 0,
                radial-gradient(circle, transparent 70%, #ffffff 75%) 10px 10px;
            background-size: 20px 20px;
            background-position: 0 -10px;
        }

        .receipt-header-line {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            border-bottom: 2px solid #1f2937;
            padding-bottom: 1rem;
            margin-bottom: 1.5rem;
        }

        .receipt-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            font-family: 'Courier New', Courier, monospace;
            font-size: 0.95rem;
            color: #374151;
        }

        .receipt-total {
            display: flex;
            justify-content: space-between;
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 2px dashed #d1d5db;
            font-weight: 800;
            font-size: 1.25rem;
        }



        .pay-btn-large {
            width: 100%;
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-bottom: 1rem;
            font-weight: 700;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all var(--transition-normal);
            border: none;
            box-shadow: var(--shadow-card);
        }

        .pay-btn-large:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-card-hover);
        }



        .checkout-divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 1rem 0;
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .checkout-divider::before,
        .checkout-divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--border-default);
        }

        .checkout-divider span {
            padding: 0 1rem;
        }

        .payment-message {
            margin-top: 1rem;
            padding: 0.75rem 1rem;
            border-radius: var(--radius-sm);
            font-size: 0.9rem;
            text-align: center;
        }

        .payment-message.error {
            background: #fee2e2;
            color: #dc2626;
        }

        .payment-message.success {
            background: #dcfce7;
            color: #16a34a;
        }

        .pay-icon {
            width: 24px;
            height: 24px;
            margin-right: 10px;
        }

        /* Neat Buttons from My Projects */
        .btn-neat {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.8rem;
            text-align: center;
            cursor: pointer;
            border: 1.5px solid transparent;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.15s ease;
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }

        .btn-neat.primary {
            background: transparent;
            color: var(--primary);
            border-color: var(--primary);
        }

        .btn-neat.primary:hover {
            background: var(--primary);
            color: white;
        }

        .btn-neat.secondary {
            background: transparent;
            color: var(--secondary);
            border-color: var(--secondary);
        }

        .btn-neat.secondary:hover {
            background: var(--secondary);
            color: white;
        }

        /* Neat Input */
        .neat-input-wrapper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid var(--border-default);
            border-radius: var(--radius-md);
            padding: 0.75rem 1rem;
            transition: all 0.1s ease;
            width: 100%;
        }

        .neat-input-wrapper:focus-within {
            background: var(--white);
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(230, 126, 115, 0.2);
        }

        .neat-input-wrapper input {
            border: none;
            outline: none;
            font-size: 1rem;
            width: 100%;
            background: transparent;
            color: var(--text-main);
        }

        @media (max-height: 500px) {
            .card-mockup-wrapper.type-ecard {
                min-height: 100vh;
                max-height: 100vh;
            }
        }

        /* ========================================================== */
        /* MOBILE-FIRST OPTIMIZATIONS (Max-width 768px and smaller) */
        /* ========================================================== */
        @media (max-width: 768px) {
            :root {
                --nav-height: 70px;
            }

            main.container,
            #ecards-categories-view,
            #ecards-mobile-catalogue,
            #ecards-mobile-catalogue-content,
            .mobile-catalogue-shell,
            .mobile-catalogue-section,
            .mobile-rails,
            .mobile-rail-section {
                width: 100%;
                max-width: 100%;
                min-width: 0;
                overflow-x: hidden;
            }

            .ecards-mobile-catalogue {
                display: block;
            }

            /* Keep desktop catalogue hidden in the categories view only.
               Do not hide all .sub-gallery-grid instances, because the existing
               card list view still uses that class on mobile. */
            #ecards-categories-view #ecards-category-grid,
            #ecards-categories-view #ecards-featured-section,
            #ecards-categories-view #ecards-category-heading {
                display: none !important;
            }

            #ecards-categories-view .catalogue-rail,
            #ecards-categories-view .catalogue-rail-head {
                display: none !important;
            }

            .mobile-featured-strip,
            .mobile-rail-track,
            .mobile-chip-row {
                overflow-x: auto;
                overflow-y: hidden;
            }

            /* Force single column for all complex forms/grids on small screens */
            .sub-gallery-grid {
                grid-template-columns: 1fr;
            }

            .checkout-layout {
                grid-template-columns: 1fr;
            }

            .customize-container {
                grid-template-columns: 1fr;
            }

            .customize-container>.custom-form {
                order: 1;
            }

            .customize-container>.card-mockup-wrapper {
                order: 2;
            }

            .checkout-layout>div:nth-child(2) {
                padding-top: 0;
            }

            /* Remove extra padding on mobile checkout payment section */
            .grid-cols-md-3 {
                grid-template-columns: 1fr;
            }

            /* Force form inputs to single column stack */
        }

        @media (min-width: 769px) {
            .ecards-mobile-catalogue {
                display: none !important;
            }
        }

        /* ========================================================== */
        /* TABLET/DESKTOP STYLES (Min-width 768px and up) */
        /* ========================================================== */
        @media (min-width: 768px) {
            /* nav-links must be re-shown here because ecards.css sets display:none globally (overriding site-base.css) */
            .nav-links {
                display: flex;
                align-items: center;
            }

            .menu-toggle {
                display: none;
            }

            .grid-cols-md-3 {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .sub-gallery-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .checkout-layout {
                grid-template-columns: 1fr 1fr;
            }

            /* Two-column layout: card preview (larger) on left, form (smaller) on right */
            .customize-container {
                grid-template-columns: 3fr 2fr;
            }

            .customize-container>.card-mockup-wrapper {
                order: 1;
            }

            .customize-container>.custom-form {
                order: 2;
            }
        }

        /* Larger Desktops (Min-width 1024px and up) */
        @media (min-width: 1024px) {
            .sub-gallery-grid {
                grid-template-columns: repeat(5, 1fr);
            }

            /* eCard tiles � 4 columns so images render larger */
            #cards-container.sub-gallery-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .customize-container {
                grid-template-columns: 3fr 2fr;
                gap: 2rem;
            }

            .customize-container>.card-mockup-wrapper {
                order: 1;
            }

            .customize-container>.custom-form {
                order: 2;
            }

            /* Compact form styles for desktop */
            .custom-form {
                padding: 1.25rem;
            }

            .custom-form .form-input,
            .custom-form .form-textarea {
                padding: 0.6rem 0.75rem;
                margin-bottom: 0.75rem;
                font-size: 0.9rem;
            }

            .custom-form .form-textarea {
                min-height: 80px;
            }

            .custom-form .form-label {
                font-size: 0.8rem;
                margin-bottom: 0.25rem;
            }

            .custom-form .flex.gap-2 {
                gap: 0.5rem;
                align-items: stretch;
            }
            .custom-form .flex.gap-2 button {
                padding: 0.55rem 0.75rem !important;
                font-size: 0.85rem !important;
                border-radius: 10px;
                line-height: 1.2;
                white-space: nowrap;
            }
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.15);
            border-radius: 10px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.25);
        }

        /* Focus states for accessibility */
        a:focus-visible,
        button:focus-visible,
        input:focus-visible,
        textarea:focus-visible,
        select:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
            border-radius: var(--radius-sm);
        }

        /* Enhanced input styling */
        select.form-input {
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            padding-right: 2.5rem;
        }

        @media print {
            @page {
                margin: 0;
                size: portrait;
            }

            body {
                background: white !important;
                padding: 0 !important;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }

            body::before {
                display: none;
            }

            .navbar,
            .btn-back,
            .mockup-controls,
            .btn-neat,
            .btn-cozy,
            .btn-outline,
            .menu-toggle,
            #mobile-menu {
                display: none !important;
            }

            .app-view {
                padding: 1cm !important;
            }

            .container {
                max-width: 100% !important;
                width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
            }

            /* Success View Specifics */
            #success-view {
                display: block !important;
            }

            #success-view .container.text-center {
                margin-bottom: 0.5rem !important;
            }

            #success-view h2 {
                font-size: 1.8rem !important;
                margin-bottom: 0.25rem !important;
                color: #000 !important;
            }

            #success-view p.text-xl {
                display: none !important;
            }

            /* Preview Area */
            .preview-column {
                margin-bottom: 0.5rem !important;
                page-break-inside: avoid;
            }

            #receipt-flipbook-container {
                min-height: 200px !important;
                height: 200px !important;
                border: 1px solid #eee !important;
                box-shadow: none !important;
            }

            /* Receipt Card */
            .checkout-layout {
                display: block !important;
            }

            .summary-card {
                box-shadow: none !important;
                border: none !important;
                padding: 0 !important;
                page-break-inside: avoid;
            }

            /* Hide elements below Total Paid */
            .summary-card .border-t,
            .summary-card .flex.flex-col {
                display: none !important;
            }

            /* Ensure Total Paid is visible and styled for print */
            .receipt-total {
                display: flex !important;
                border-top: 1px solid #000 !important;
                margin-top: 1rem !important;
                padding-top: 0.5rem !important;
            }



            .receipt-header-line {
                border-bottom: 1px solid #000 !important;
                margin-bottom: 1rem !important;
            }
        }

        .inline-check {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.8rem;
            height: 1.8rem;
            background: #dcfce7;
            color: #16a34a;
            border-radius: 50%;
            vertical-align: middle;
            margin-left: 0.3rem;
        }
        .inline-check i, .inline-check svg {
            width: 1.1rem;
            height: 1.1rem;
        }

        /* ── Extras toggle (mobile collapsible) ────────────── */
        .extras-toggle {
            display: none;
        }
        @media (max-width: 767px) {
            .mobile-catalogue-head {
                flex-wrap: wrap;
            }

            .mobile-swipe-hint {
                margin-top: 0.15rem;
            }

            .extras-toggle {
                display: flex;
                align-items: center;
                justify-content: space-between;
                width: 100%;
                padding: 0.7rem 1rem;
                margin-bottom: 0.75rem;
                background: linear-gradient(135deg, #f0e6f6 0%, #e0ecf8 100%);
                border: 1.5px solid #d1d5db;
                border-radius: 10px;
                font-size: 0.85rem;
                font-weight: 700;
                color: #4a4a4a;
                cursor: pointer;
                transition: background 0.2s;
            }
            .extras-toggle:hover { background: #e8ddf0; }
            .extras-chevron {
                width: 1rem;
                height: 1rem;
                transition: transform 0.3s ease;
            }
            .extras-toggle.open .extras-chevron {
                transform: rotate(180deg);
            }
            .extras-panel {
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.35s ease;
            }
            .extras-panel.open {
                max-height: 500px;
            }
        }

        /* ── Mobile Receipt View (≤ 640px) ─────────────────── */
        @media (max-width: 640px) {

            /* Reduce card padding so content isn't squeezed out */
            .summary-card {
                padding: 1.25rem 1rem;
                overflow: visible;
            }

            /* 3 action buttons wrap to 2+1 on small screens */
            #receipt-action-btns {
                flex-wrap: wrap;
                gap: 0.5rem;
            }

            #receipt-action-btns .btn-neat {
                flex: 1 1 auto;
                min-width: 0;
                font-size: 0.78rem;
                padding: 0.45rem 0.65rem;
                justify-content: center;
                text-align: center;
            }

            /* 3 send-tab buttons shrink to fit narrow screens */
            #send-tabs .send-tab {
                font-size: 0.72rem !important;
                padding: 0.4rem 0.3rem !important;
            }

            /* Share link 3-button row allows wrapping */
            #receipt-share-btns {
                flex-wrap: wrap;
            }

            #receipt-share-btns button {
                flex: 1 1 auto;
                justify-content: center;
            }

            /* Success heading: shrink on small screens */
            #success-view .container.text-center h2,
            #success-view h2 {
                font-size: 1.4rem !important;
                line-height: 1.2;
                margin-bottom: 0.25rem;
            }

            #success-view .container.text-center {
                margin-bottom: 0.5rem !important;
            }

            .inline-check {
                width: 1.4rem;
                height: 1.4rem;
            }
            .inline-check i, .inline-check svg {
                width: 0.9rem;
                height: 0.9rem;
            }

            #receipt-flipbook-container {
                min-height: 280px !important;
                height: min(50vh, 400px) !important;
                max-width: 100%;
                aspect-ratio: auto;
            }
        }

        /* ── Success View: consistent section spacing ─────── */
        .success-layout {
            grid-template-columns: 1fr !important;
            gap: 1.5rem !important;
        }

        #receipt-flipbook-container {
            min-height: 280px;
            max-width: 520px;
            margin: 0 auto;
            aspect-ratio: 3 / 4;
        }

        @media (min-width: 768px) {
            #receipt-flipbook-container {
                min-height: 600px;
            }
        }
    
        /* ── Publisher content panel (AdSense-friendly, low visual impact) ─────── */
        .publisher-panel {
            margin: 2.25rem auto 0;
            max-width: 900px;
            background: rgba(255, 255, 255, 0.72);
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            overflow: hidden;
        }
        .publisher-panel .publisher-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 1rem 1.25rem;
            cursor: pointer;
            user-select: none;
        }
        .publisher-panel .publisher-head h3 {
            font-family: 'Caveat', cursive;
            font-size: 1.6rem;
            margin: 0;
            color: var(--text-dark);
            line-height: 1;
        }
        .publisher-panel .publisher-head p {
            margin: 0.25rem 0 0;
            color: #6b7280;
            font-weight: 600;
            font-size: 0.95rem;
        }
        .publisher-panel summary {
            list-style: none;
        }
        .publisher-panel summary::-webkit-details-marker {
            display: none;
        }
        .publisher-panel .chev {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
            opacity: 0.75;
            transition: transform 200ms ease;
        }
        .publisher-panel details[open] .chev {
            transform: rotate(180deg);
        }
        .publisher-panel .publisher-body {
            padding: 0 1.25rem 1.25rem;
        }
        .publisher-panel .publisher-body .cols {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }
        @media (min-width: 900px) {
            .publisher-panel .publisher-body .cols {
                grid-template-columns: 1.2fr 0.8fr;
                gap: 1.25rem;
            }
        }
        .publisher-panel .publisher-body h4 {
            margin: 1rem 0 0.5rem;
            font-size: 1.05rem;
            color: #111827;
        }
        .publisher-panel .publisher-body p,
        .publisher-panel .publisher-body li {
            color: #374151;
            font-size: 0.95rem;
            line-height: 1.65;
        }
        .publisher-panel .publisher-body ul {
            margin: 0.5rem 0 0;
            padding-left: 1.2rem;
        }
        .publisher-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }
        .publisher-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.35rem 0.7rem;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.02em;
            border: 1px solid rgba(0,0,0,0.08);
            background: rgba(255,255,255,0.85);
            color: #374151;
            white-space: nowrap;
        }
        .publisher-badge i, .publisher-badge svg {
            width: 14px;
            height: 14px;
        }
        .publisher-note {
            margin-top: 0.85rem;
            padding: 0.75rem 0.85rem;
            border-radius: var(--radius-md);
            background: rgba(230, 126, 115, 0.08);
            border: 1px solid rgba(230, 126, 115, 0.18);
            color: #374151;
            font-size: 0.9rem;
        }

        /* Storybook Luxe across all eCard sections */
        .app-view .text-center h2,
        #checkout-view h3,
        #success-view h2,
        .catalogue-rail-head h3,
        .publisher-panel .publisher-head h3,
        .related-cards-section h4 {
            color: var(--theme-plum);
        }

        .app-view .text-center p,
        .publisher-panel .publisher-head p,
        .publisher-panel .publisher-body p,
        .publisher-panel .publisher-body li,
        .receipt-row,
        .card-date-added,
        .checkout-divider,
        .card-input-section,
        .payment-message {
            color: rgba(79, 54, 64, 0.82);
        }

        .category-content,
        .custom-form,
        .summary-card,
        .publisher-panel,
        .related-card-tile,
        .mockup-controls,
        .contacts-dropdown,
        .neat-input-wrapper {
            background: var(--theme-surface);
            border-color: var(--theme-line);
            box-shadow: 0 16px 36px var(--theme-shadow);
        }

        .category-content {
            background: var(--theme-surface);
            border-color: var(--theme-line);
        }

        .category-content::before {
            display: none;
        }

        .category-card:not(.disabled):hover .category-content,
        .related-card-tile:hover {
            border-color: var(--theme-line-strong);
            box-shadow: 0 22px 46px rgba(125, 73, 92, 0.18);
        }

        .grid-img-box {
            background: var(--theme-surface);
            box-shadow: 0 10px 24px rgba(137, 89, 106, 0.12);
        }

        .grid-img-box::before {
            display: none;
        }

        .btn-customize,
        .related-card-tile .rel-btn,
        .btn-neat.primary,
        .btn-neat.secondary {
            background: rgba(255, 247, 242, 0.78);
            border-color: rgba(209, 151, 138, 0.52);
            color: var(--theme-rose);
            box-shadow: 0 6px 16px rgba(137, 89, 106, 0.10);
        }

        .btn-customize:hover,
        .category-card:hover .btn-customize,
        .related-card-tile:hover .rel-btn,
        .btn-neat.primary:hover,
        .btn-neat.secondary:hover {
            background: linear-gradient(135deg, #d98980, #b96872);
            border-color: transparent;
            color: #ffffff;
        }

        .btn-outline {
            background: rgba(255, 249, 246, 0.88);
            border-color: rgba(209, 151, 138, 0.42);
            color: var(--theme-ink);
        }

        .btn-outline:hover {
            background: rgba(255, 255, 255, 0.95);
        }

        .form-input,
        .form-textarea,
        .magic-message-bar select,
        .neat-input-wrapper,
        .contacts-dropdown {
            background: rgba(255, 255, 255, 0.82);
            border-color: rgba(209, 151, 138, 0.34);
        }

        .contacts-dropdown-item:hover {
            background: rgba(253, 241, 233, 0.92);
        }

        .card-mockup-wrapper.type-ecard,
        #receipt-flipbook-container {
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.96) 0%, rgba(247, 235, 241, 0.9) 100%);
            border: 1px solid var(--theme-line);
            box-shadow: 0 18px 42px rgba(137, 89, 106, 0.14);
        }

        .preview-header {
            background: rgba(255, 249, 246, 0.86);
            border-color: rgba(255, 255, 255, 0.92);
            color: var(--theme-plum);
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.94);
        }

        .summary-card {
            border-radius: 18px;
            border-color: rgba(209, 151, 138, 0.42);
        }

        .summary-card::after {
            background: radial-gradient(circle, transparent 70%, rgba(255, 251, 248, 0.98) 75%) 0 0,
                radial-gradient(circle, transparent 70%, rgba(255, 251, 248, 0.98) 75%) 10px 10px;
            background-size: 20px 20px;
            background-position: 0 -10px;
        }

        #success-view .container.text-center {
            background: linear-gradient(180deg, rgba(255, 252, 249, 0.98) 0%, rgba(253, 241, 233, 0.94) 100%);
            border: 1px solid rgba(209, 151, 138, 0.36);
            box-shadow: 0 16px 36px rgba(137, 89, 106, 0.12);
        }

        #success-view .container.text-center {
            border-radius: 24px;
            padding: 2rem;
        }

        .receipt-header-line {
            border-bottom-color: rgba(99, 59, 70, 0.84);
        }

        .receipt-total {
            border-top-color: rgba(209, 151, 138, 0.48);
            color: var(--theme-plum);
        }

/* ── Footer (ecards page override) ─────────────────────────── */
/* site-base.css uses a gradient background; ecards page uses a semi-transparent white */
.site-footer { padding: 2rem 1rem 1.5rem; background: rgba(255, 255, 255, 0.85); border-top: 1px solid rgba(0, 0, 0, 0.07); margin-top: 2rem; text-align: center; }
.footer-inner { max-width: 900px; margin: 0 auto; }
.footer-brand { font-family: 'Caveat', cursive; font-size: 1.3rem; font-weight: 700; color: #2d2d2d; margin-bottom: 0.25rem; }
.footer-tagline { font-size: 0.8rem; color: #6b7280; margin-bottom: 1rem; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.75rem; margin-bottom: 1rem; font-size: 0.8rem; }
.footer-nav a { color: #6b7280; text-decoration: none; transition: color 0.2s; }
.footer-nav a:hover { color: #e67e73; }
.footer-nav span { color: #d1d5db; }
.footer-btm { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: #9ca3af; border-top: 1px solid rgba(0, 0, 0, 0.07); padding-top: 1rem; margin-top: 0.5rem; }

