/**
 * @copyright © SixPrint. All rights reserved.
 */

        :root {
            --brand-pink: #FF269E;
            --brand-purple: #924EFF;
            --brand-dark: #333;
            --brand-light: #fafafa;
            --brand-white: #ffffff;
            --border-light: #e8e8e8;
            --text-muted: #666;
            --nav-height: 70px;
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
            background: var(--brand-light);
            color: var(--brand-dark);
            line-height: 1.6;
            min-height: 100vh;
        }

        /* Header */
        header {
            background: var(--brand-white);
            border-bottom: 1px solid var(--border-light);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: all 0.3s ease;
        }

        /* Glassy header when scrolled */
        header.scrolled {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(232, 232, 232, 0.3);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        }

        .nav-container {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: var(--nav-height);
            padding: 0 2rem;
        }

        .logo {
            display: flex;
            align-items: center;
        }

        .logo-link {
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: opacity 0.3s ease;
        }

        .logo-link:hover {
            opacity: 0.8;
        }

        .logo-img {
            height: 51px;
            width: auto;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes gradientBorder {
            0%, 100% { background-position: 0 0, 0% 50%; }
            50% { background-position: 0 0, 100% 50%; }
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

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

        .nav-links a {
            color: var(--brand-dark);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: var(--brand-pink);
        }

        .nav-links a.active {
            color: var(--brand-pink);
            position: relative;
        }

        .nav-links a.active::after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--brand-pink);
        }

        /* Basket Button Styles - White background with gradient icon */
        .basket-button {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: var(--brand-white);
            border: 2px solid var(--border-light);
            color: var(--brand-dark);
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1.05rem;
            position: relative;
            transition: all 0.3s ease;
            text-decoration: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .basket-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(146, 78, 255, 0.2);
            border-color: var(--brand-pink);
        }

        .basket-button:active {
            transform: translateY(0);
        }

        /* Pulse animation when items added */
        @keyframes basket-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .basket-button.has-items {
            animation: basket-pulse 0.5s ease;
        }

        .basket-counter {
            position: absolute;
            top: -6px;
            right: -6px;
            background: #FF6B6B;
            color: white;
            font-size: 0.8rem;
            font-weight: 700;
            min-width: 24px;
            height: 24px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 8px;
            box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
            border: 2px solid white;
        }

        .basket-icon {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
        }

        .basket-text {
            color: var(--brand-dark);
        }

        /* Basket Dropdown Styles */
        .basket-menu {
            position: relative;
        }

        .basket-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--brand-white);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            min-width: 320px;
            max-width: 400px;
            z-index: 1000;
            margin-top: 0.5rem;
        }

        .basket-menu:hover .basket-dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .basket-dropdown-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(135deg, rgba(255, 38, 158, 0.05), rgba(146, 78, 255, 0.05));
        }

        .basket-dropdown-header strong {
            color: var(--brand-dark);
            font-size: 1rem;
        }

        .basket-dropdown-header span {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .basket-dropdown-items {
            max-height: 300px;
            overflow-y: auto;
            padding: 0.5rem 0;
        }

        .basket-dropdown-items:empty::after {
            content: 'Your basket is empty';
            display: block;
            text-align: center;
            padding: 2rem 1rem;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .basket-dropdown-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--border-light);
            transition: background 0.2s ease;
        }

        .basket-dropdown-item:last-child {
            border-bottom: none;
        }

        .basket-dropdown-item:hover {
            background: var(--brand-light);
        }

        .basket-dropdown-item-name {
            flex: 1;
            font-size: 0.9rem;
            color: var(--brand-dark);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-right: 1rem;
        }

        .basket-dropdown-item-qty {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 500;
            white-space: nowrap;
        }

        .basket-dropdown-footer {
            padding: 1rem;
            border-top: 1px solid var(--border-light);
            text-align: center;
        }

        .view-full-basket-btn {
            display: block;
            width: 100%;
            padding: 0.75rem 1rem;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
        }

        .view-full-basket-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(146, 78, 255, 0.3);
        }

        /* Scrollbar styling for basket dropdown */
        .basket-dropdown-items::-webkit-scrollbar {
            width: 6px;
        }

        .basket-dropdown-items::-webkit-scrollbar-track {
            background: var(--brand-light);
        }

        .basket-dropdown-items::-webkit-scrollbar-thumb {
            background: var(--border-light);
            border-radius: 3px;
        }

        .basket-dropdown-items::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        /* Reorder modal styles */
        .reorder-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }

        .reorder-modal {
            background: var(--brand-white);
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem;
            border-bottom: 1px solid var(--border-light);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-muted);
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-body {
            padding: 1.5rem;
        }

        .design-preview {
            margin-bottom: 1.5rem;
        }

        .design-details {
            margin-top: 1rem;
            padding: 1rem;
            background: var(--brand-light);
            border-radius: 8px;
        }

        .design-details p {
            margin: 0.5rem 0;
        }

        .reorder-options .form-group {
            margin-bottom: 1rem;
        }

        .reorder-options label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--brand-dark);
        }

        .reorder-options input,
        .reorder-options select {
            padding: 0.5rem;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            font-size: 1rem;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            padding: 1.5rem;
            border-top: 1px solid var(--border-light);
            background: var(--brand-light);
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-muted);
            border: 1px solid var(--border-light);
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
        }

        .user-menu {
            position: relative;
        }

        .user-button {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: none;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .user-button:hover {
            background: var(--brand-light);
        }

        .user-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--brand-white);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            min-width: 220px;
            z-index: 1000;
            padding: 0.5rem 0;
            margin-top: 0.5rem;
        }

        .user-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: block;
            padding: 0.75rem 1rem;
            color: var(--brand-dark);
            text-decoration: none;
            transition: all 0.3s ease;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            cursor: pointer;
        }

        .dropdown-item:hover {
            background: var(--brand-light);
            color: var(--brand-pink);
        }

        .dropdown-divider {
            height: 1px;
            background: var(--border-light);
            margin: 0.5rem 0;
        }

        .dropdown-header {
            padding: 0.5rem 1rem;
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
        }

        /* Main Content */
        .main-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }

        .dashboard-header {
            margin-bottom: 2rem;
        }

        .dashboard-header h1 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            color: var(--brand-dark);
        }

        .dashboard-header p {
            color: var(--text-muted);
            font-size: 1.1rem;
        }

        /* Stats Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 3rem;
        }

        .stat-card {
            background: var(--brand-white);
            padding: 2rem;
            border-radius: 12px;
            border: 1px solid var(--border-light);
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        /* Clickable stat card buttons */
        .stat-card-button {
            cursor: pointer;
            text-decoration: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 2px solid var(--border-light);
            position: relative;
            overflow: hidden;
        }

        .stat-card-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .stat-card-button:hover::before {
            opacity: 1;
        }

        .stat-card-button:active {
            transform: translateY(0);
        }

        .stat-card-disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .stat-card-disabled:hover {
            transform: none;
            box-shadow: none;
            border-color: var(--border-light);
        }

        .stat-card-disabled::before {
            display: none;
        }

        .stat-number {
            font-size: 4.5rem;
            font-weight: 600;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 1rem;
            min-height: 155px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            line-height: 1;
        }

        .stat-icon {
            font-size: 3rem;
            min-height: 155px;
            margin-bottom: 1rem;
            display: flex;
            align-items: flex-end;
            justify-content: center;
        }

        .stat-icon-upload {
            width: 80px;
            height: 80px;
            margin-bottom: 1rem;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            -webkit-mask: url('/assets/images/Upload.svg') no-repeat center;
            mask: url('/assets/images/Upload.svg') no-repeat center;
            -webkit-mask-size: contain;
            mask-size: contain;
        }

        .stat-icon-add-catalogue {
            width: 155px;
            height: 155px;
            min-height: 155px;
            margin-bottom: 1rem;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            -webkit-mask: url('/assets/images/Add%20to%20Catalogue.svg') no-repeat center;
            mask: url('/assets/images/Add%20to%20Catalogue.svg') no-repeat center;
            -webkit-mask-size: contain;
            mask-size: contain;
        }

        .stat-icon-upload-image {
            width: 130px;
            height: 130px;
            min-height: 155px;
            margin-bottom: 1rem;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            -webkit-mask: url('/assets/images/upload%20image.svg') no-repeat center;
            mask: url('/assets/images/upload%20image.svg') no-repeat center;
            -webkit-mask-size: contain;
            mask-size: contain;
        }

        .stat-icon-design-online {
            width: 155px;
            height: 155px;
            min-height: 155px;
            margin-bottom: 1rem;
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            -webkit-mask: url('/assets/images/Design%20Online.svg') no-repeat center;
            mask: url('/assets/images/Design%20Online.svg') no-repeat center;
            -webkit-mask-size: contain;
            mask-size: contain;
        }

        .stat-label {
            color: var(--brand-dark);
            font-weight: 600;
            font-size: 1.1rem;
            margin-bottom: 0.25rem;
            min-height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .stat-sublabel {
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 400;
            min-height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Portfolio Section */
        .portfolio-section {
            background: var(--brand-white);
            border-radius: 12px;
            border: 1px solid var(--border-light);
            overflow: hidden;
        }

        .section-header {
            padding: 2rem 2rem 1rem;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .section-header h2 {
            font-size: 1.5rem;
            color: var(--brand-dark);
        }

        .portfolio-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .search-filter {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .search-input {
            padding: 0.5rem 1rem;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            min-width: 200px;
        }

        .filter-select {
            padding: 0.5rem 1rem;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            background: white;
        }

        .view-toggle {
            display: flex;
            gap: 0.5rem;
        }

        .view-btn {
            padding: 0.5rem 1rem;
            background: none;
            border: 1px solid var(--border-light);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .view-btn.active {
            background: var(--brand-pink);
            color: white;
            border-color: var(--brand-pink);
        }

        .sort-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
        }

        .portfolio-content {
            padding: 2rem;
        }

        .empty-state {
            text-align: center;
            padding: 4rem 2rem;
            color: var(--text-muted);
        }

        .empty-state h3 {
            margin-bottom: 1rem;
            color: var(--brand-dark);
        }

        .empty-state p {
            margin-bottom: 2rem;
        }

        /* Upload Button */
        .upload-btn {
            padding: 0.75rem 1.5rem;
            color: var(--brand-dark);
            border-radius: 6px;
            font-weight: 500;
            font-size: 1rem;
            position: relative;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: 3px solid transparent;
            background:
                linear-gradient(#fff, #fff) padding-box,
                linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-pink)) border-box;
            background-size: auto, 200% 100%;
            animation: gradientBorder 3s ease-in-out infinite;
            text-decoration: none;
            display: inline-block;
        }

        .upload-btn::before {
            display: none;
        }

        .upload-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(255, 38, 158, 0.2);
        }

        /* Design Tool Styles - Canva-inspired */
        .design-step {
            min-height: 70vh;
            display: flex;
            flex-direction: column;
        }

        .step-header {
            text-align: center;
            margin-bottom: 3rem;
            position: relative;
        }

        .step-title-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 800px;
            margin: 0 auto;
        }

        .step-title-container > div {
            flex: 1;
        }

        .step-header h2 {
            font-size: 2.5rem;
            font-weight: 300;
            color: var(--brand-dark);
            margin-bottom: 0.75rem;
        }

        .step-header p {
            font-size: 1.1rem;
            color: var(--text-muted);
        }

        @media (max-width: 768px) {
            .step-title-container {
                flex-direction: column;
                gap: 1rem;
            }
            
            .step-title-container .upload-btn {
                align-self: center;
            }
        }

        .back-btn {
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--brand-pink);
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem;
            border-radius: 6px;
            transition: background-color 0.2s;
        }

        .back-btn:hover {
            background: var(--brand-light);
        }

        /* Product Grid */
        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 1.5rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        .product-card {
            background: var(--brand-white);
            border: 2px solid var(--border-light);
            border-radius: 16px;
            padding: 2rem 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .product-card:hover {
            border-color: var(--brand-pink);
            transform: scale(1.02);
            box-shadow: 0 8px 30px rgba(255, 38, 158, 0.1);
        }

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

        .product-card h3 {
            color: var(--brand-dark);
            margin-bottom: 0.5rem;
            font-size: 1.2rem;
            font-weight: 600;
        }

        .product-card p {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.4;
        }

        /* Size Grid */
        .size-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .size-card {
            background: var(--brand-white);
            border: 2px solid var(--border-light);
            border-radius: 12px;
            padding: 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .size-card:hover {
            border-color: var(--brand-pink);
            transform: translateY(-2px);
        }

        .size-card.selected {
            border-color: var(--brand-pink);
            background: var(--brand-pink);
            color: white;
        }

        /* Orientation Selection */
        .orientation-options {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 300px;
        }
        .orientation-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 2rem;
            max-width: 600px;
            margin: 0 auto;
        }
        .orientation-card {
            background: var(--brand-white);
            border: 2px solid var(--border-light);
            border-radius: 12px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }
        .orientation-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
            border-color: var(--brand-pink);
        }
        .orientation-preview {
            width: 120px;
            height: 80px;
            background: var(--brand-light);
            border-radius: 8px;
            border: 2px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: var(--text-muted);
            transition: all 0.2s ease;
        }
        .orientation-card:hover .orientation-preview {
            border-color: var(--brand-pink);
            background: var(--brand-pink-light);
        }
        .orientation-card.landscape .orientation-preview {
            width: 80px;
            height: 120px;
        }
        .orientation-card h3 {
            margin: 0;
            color: var(--text-primary);
            font-size: 1.2rem;
        }
        .orientation-card p {
            margin: 0;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        /* Template Options */
        .template-options {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        .start-blank {
            max-width: 300px;
            margin: 0 auto;
        }

        .blank-template {
            background: var(--brand-white);
            border: 2px dashed var(--border-light);
            border-radius: 12px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .blank-template:hover {
            border-color: var(--brand-pink);
            background: var(--brand-light);
        }

        .plus-icon {
            font-size: 3rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
        }

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

        .template-card {
            background: var(--brand-white);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .template-card:hover {
            transform: scale(1.02);
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        .template-preview {
            aspect-ratio: 3/4;
            background: var(--brand-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
        }

        .template-info {
            padding: 1rem;
            text-align: center;
        }

        /* Design Editor */
        .editor-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 2rem;
            background: var(--brand-white);
            border-bottom: 1px solid var(--border-light);
        }

        .editor-title h2 {
            font-size: 1.5rem;
            color: var(--brand-dark);
            margin: 0;
        }

        .editor-actions {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .undo-redo-controls {
            display: flex;
            gap: 0.5rem;
            margin-right: 1rem;
            padding-right: 1rem;
            border-right: 1px solid var(--border-light);
        }

        .undo-btn, .redo-btn {
            width: 40px;
            height: 40px;
            border: 1px solid var(--border-light);
            background: var(--brand-white);
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: var(--brand-dark);
            transition: all 0.2s ease;
        }

        .undo-btn:hover, .redo-btn:hover {
            background: var(--brand-light);
            border-color: var(--brand-pink);
        }

        .undo-btn:disabled, .redo-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            background: var(--brand-light);
        }

        .undo-btn:disabled:hover, .redo-btn:disabled:hover {
            background: var(--brand-light);
            border-color: var(--border-light);
        }

        .save-btn, .order-btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .save-btn {
            color: var(--brand-dark);
            border: 2px solid transparent;
            position: relative;
            text-decoration: none;
            display: inline-block;
            background:
                linear-gradient(#fff, #fff) padding-box,
                linear-gradient(45deg, var(--brand-pink), var(--brand-purple), var(--brand-pink)) border-box;
            background-size: auto, 200% 200%;
            animation: gradientBorder 3s ease-in-out infinite;
        }

        .save-btn::before {
            display: none;
        }

        .save-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(255, 38, 158, 0.2);
        }

        .order-btn {
            background: var(--brand-pink);
            color: white;
        }

        .order-btn:hover {
            background: var(--brand-purple);
        }

        .editor-container {
            display: flex;
            height: calc(100vh - 200px);
            transition: height 0.3s ease;
        }

        /* When stats are hidden, give design tool more space */
        body.design-tool-active .editor-container {
            height: calc(100vh - 120px);
        }

        /* Design Tool Navigation */
        .design-tool-nav {
            background: var(--brand-white);
            border-bottom: 1px solid var(--border-light);
            padding: 1rem 2rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 100;
            margin-bottom: 2rem;
        }

        .design-progress {
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
        }

        .back-btn {
            background: var(--brand-light);
            border: 1px solid var(--border-light);
            color: var(--brand-dark);
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .back-btn:hover {
            background: var(--brand-pink);
            color: white;
            border-color: var(--brand-pink);
        }

        /* Vertical Collapsible Sidebar */
        .vertical-sidebar {
            width: 80px;
            background: var(--brand-white);
            border-right: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
            position: relative;
            transition: width 0.3s ease;
        }

        .vertical-sidebar.expanded {
            width: 320px;
        }

        .tool-panel {
            position: relative;
            border-bottom: 1px solid var(--border-light);
        }

        .tool-panel.disabled {
            opacity: 0.5;
            pointer-events: none;
        }

        .tool-icon {
            width: 80px;
            height: 80px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: var(--brand-white);
            position: relative;
            z-index: 10;
        }

        .tool-icon:hover {
            background: var(--brand-light);
        }

        .tool-panel.active .tool-icon {
            background: var(--brand-pink);
            color: white;
        }

        .tool-icon .icon {
            font-size: 1.5rem;
            font-weight: bold;
            margin-bottom: 0.25rem;
        }

        .tool-icon .label {
            font-size: 0.7rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .tool-content {
            position: absolute;
            left: 80px;
            top: 0;
            width: 240px;
            min-height: 300px;
            background: var(--brand-white);
            border: 1px solid var(--border-light);
            border-left: none;
            box-shadow: 2px 0 8px rgba(0,0,0,0.1);
            transform: translateX(-100%);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 5;
            overflow-y: auto;
            max-height: calc(100vh - 300px);
        }

        .tool-panel.active .tool-content {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }

        @media (max-width: 768px) {
            .vertical-sidebar {
                width: 60px;
            }
            
            .tool-icon {
                width: 60px;
                height: 60px;
            }
            
            .tool-icon .icon {
                font-size: 1.2rem;
            }
            
            .tool-icon .label {
                font-size: 0.6rem;
            }
            
            .tool-content {
                left: 60px;
                width: 200px;
            }
        }

        .canvas-area {
            flex: 1;
            background: var(--brand-light);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .properties-panel {
            width: 240px;
            background: var(--brand-white);
            border-left: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
        }

        .properties-header {
            background: var(--brand-light);
            border-bottom: 1px solid var(--border-light);
            padding: 1rem;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .properties-header h3 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            color: var(--brand-dark);
        }

        .properties-content {
            flex: 1;
            padding: 1rem;
            overflow-y: auto;
        }

        /* Give canvas more space on larger screens */
        @media (min-width: 1200px) {
            .properties-panel {
                width: 220px;
            }
        }

        /* Portfolio Grid */
        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }

        .portfolio-list {
            display: none;
            flex-direction: column;
            gap: 1rem;
        }

        .portfolio-list.active {
            display: flex;
        }

        .portfolio-grid.active {
            display: grid;
        }

        .design-card {
            background: var(--brand-white);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }

        .design-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .design-card.list-view {
            display: flex;
            flex-direction: row;
            height: 120px;
        }

        .design-thumbnail {
            width: 100%;
            height: 200px;
            background: var(--brand-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            font-size: 3rem;
            position: relative;
        }

        .design-card.list-view .design-thumbnail {
            width: 120px;
            height: 120px;
            flex-shrink: 0;
        }

        .design-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .design-status {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            padding: 0.25rem 0.5rem;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 500;
            text-transform: uppercase;
        }

        .status-recent {
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
        }

        .status-reorder {
            background: rgba(59, 130, 246, 0.1);
            color: #2563EB;
        }

        .design-info {
            padding: 1rem;
            flex: 1;
        }

        .design-meta {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.5rem;
        }

        .design-name {
            font-weight: 600;
            margin-bottom: 0.25rem;
            color: var(--brand-dark);
            line-height: 1.3;
        }

        .design-date {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .design-details {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 1rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .design-tag {
            background: var(--brand-light);
            color: var(--brand-dark);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.8rem;
        }

        .design-actions {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .btn-small {
            padding: 0.5rem 1rem;
            background: var(--brand-pink);
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .btn-small:hover {
            background: var(--brand-purple);
        }

        .btn-small.secondary {
            background: transparent;
            color: var(--brand-pink);
            border: 1px solid var(--brand-pink);
        }

        .btn-small.secondary:hover {
            background: var(--brand-pink);
            color: white;
        }

        .btn-small.danger {
            background: transparent;
            color: #dc3545;
            border: 1px solid #dc3545;
        }

        .btn-small.danger:hover {
            background: #dc3545;
            color: white;
        }

        .btn-reorder {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: transparent;
            color: var(--brand-purple);
            border: 1px solid var(--brand-purple);
        }

        .btn-reorder:hover {
            background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
            color: white;
            border-color: transparent;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(146, 78, 255, 0.3);
        }

        .btn-reorder svg {
            flex-shrink: 0;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            animation: fadeIn 0.2s ease;
        }

        .modal {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            animation: slideUp 0.3s ease;
        }

        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: transparent;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-muted);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .modal-close:hover {
            background: var(--brand-light);
            color: var(--brand-dark);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

        /* Animations */
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Upload link inside nav — hidden by default, shown on phones only */
        .nav-upload-btn {
            display: none !important;
        }

        /* Hamburger Menu Button (hidden on desktop) */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
            color: var(--brand-dark);
        }

        .mobile-menu-btn svg {
            width: 24px;
            height: 24px;
        }

        /* ---- Tablet breakpoint: nav links collapse, upload btn stays visible ---- */
        @media (max-width: 1134px) {
            .nav-container {
                padding: 0 1rem;
                flex-wrap: wrap;
                height: auto;
                min-height: var(--nav-height);
                gap: 0;
            }

            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Nav links go into the hamburger dropdown */
            .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                order: 10;
                gap: 0;
                padding: 0.5rem 0 1rem;
                border-top: 1px solid var(--border-light);
            }

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

            .nav-links a {
                padding: 0.75rem 0;
                width: 100%;
            }

            .nav-links a.active::after {
                display: none;
            }

            /* Upload button stays in header bar */
            .nav-container > .upload-btn {
                white-space: nowrap;
            }
        }

        /* ---- Phone breakpoint: upload btn also collapses, tighter layout ---- */
        @media (max-width: 600px) {
            .nav-container {
                padding: 0 0.75rem;
            }

            /* Hide the header upload button, show it inside the burger instead */
            .nav-container > .upload-btn {
                display: none;
            }

            /* Show the upload link inside the burger nav on phones */
            .nav-links .nav-upload-btn {
                display: inline-block !important;
                align-self: flex-start;
                margin-top: 0.5rem;
                white-space: nowrap;
                width: auto;
            }

            .basket-text {
                display: none;
            }

            .basket-button {
                padding: 0.5rem;
            }

            .user-menu #userName {
                display: none;
            }

            .user-button {
                padding: 0.5rem;
            }

            .main-container {
                padding: 1rem;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .section-header {
                flex-direction: column;
                gap: 1rem;
                align-items: flex-start;
            }

            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            .dashboard-header h1 {
                font-size: 1.5rem;
            }

            .dashboard-header p {
                font-size: 0.95rem;
            }
        }

/* ============================================================
   ACCOUNT PAGE — 3-zone layout (Brand / Info / Security)
   ============================================================ */
.acct-page {
    display: grid;
    gap: 2rem;
    width: 100%;
}

.acct-zone {
    background: var(--brand-white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    scroll-margin-top: 96px;
}

.acct-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.acct-zone-header h3 {
    margin: 0;
    color: var(--brand-dark);
}
.acct-zone-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
.acct-zone-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}

/* Zone 1 — Brand: logo left, socials right */
.acct-brand-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
    width: 100%;
}
.acct-brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.acct-logo-frame {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    border: 2px dashed var(--border-light);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}
.acct-logo-frame.has-logo {
    border-style: solid;
    border-color: var(--border-light);
}
.acct-logo-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.acct-logo-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.4;
}

.acct-brand-socials {
    display: grid;
    gap: 0.6rem;
    align-content: start;
    width: 100%;
}
.acct-social-row {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1.1rem;
    background: var(--brand-light);
    border-radius: 10px;
    border-left: 4px solid transparent;
    width: 100%;
}
.acct-social-row.is-filled {
    border-left-color: #4caf50;
}
.acct-social-row.is-empty {
    border-left-color: #e0e0e0;
}
.acct-social-label {
    font-weight: 600;
    color: var(--brand-dark);
    font-size: 0.9rem;
}
.acct-social-value {
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acct-social-row.is-filled .acct-social-value {
    color: #333;
}
.acct-social-edit {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.acct-social-edit:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Zone 2 — Account Info: profile left, addresses right */
.acct-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.acct-card {
    background: var(--brand-light);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.acct-card h4 {
    margin: 0 0 0.85rem;
    color: var(--brand-dark);
    font-size: 1rem;
}
.acct-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
}
.acct-dl dt {
    font-weight: 600;
    color: var(--brand-dark);
    font-size: 0.9rem;
}
.acct-dl dd {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

/* Zone 3 — Security & Privacy */
.acct-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* Jump-to-section buttons (between zones) */
.acct-jump-row {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-light);
}
.acct-jump-btn {
    background: linear-gradient(135deg, var(--brand-pink), var(--brand-purple));
    color: #fff;
    border: none;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}
.acct-jump-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.acct-jump-btn--up {
    background: #fff;
    color: var(--brand-dark);
    border: 1px solid var(--border-light);
    box-shadow: none;
}

/* Mobile collapse */
@media (max-width: 720px) {
    .acct-brand-grid,
    .acct-info-grid {
        grid-template-columns: 1fr;
    }
    .acct-brand-logo { align-items: flex-start; }
    .acct-logo-frame { width: 160px; height: 160px; }
    .acct-social-row {
        grid-template-columns: 90px 1fr auto;
    }
}
