@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #FF5E00;
    --primary-dark: #cc4b00;
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-white: #FFFFFF;
    --text-muted: #BBBBBB;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Premium Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.scale-up {
    animation: scaleUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.reveal {
    opacity: 0;
}

.reveal.active {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Base Components Enhancement */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF8C00);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(255, 94, 0, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF8C00, var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 94, 0, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover,
.btn-outline.active {
    background: rgba(255, 94, 0, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 94, 0, 0.1);
}

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

/* Luxury Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: var(--transition);
}

.glass:hover {
    border-color: rgba(255, 94, 0, 0.3);
}

/* Form Elements Enhancement */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Form Elements Fix */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' 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 10px center;
    background-size: 16px;
    padding-right: 40px !important;
}

select option {
    background-color: #1a1a1a;
    color: white;
    padding: 10px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
nav {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 40px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    transition: var(--transition);
}

a:has(.logo) {
    text-decoration: none;
    color: inherit;
}

a:has(.logo):hover .logo {
    opacity: 0.8;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

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

.cart-icon {
    position: relative;
    font-size: 20px;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.hero-content h1 span {
    color: var(--primary);
    display: block;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-tshirt {
    width: 80%;
    max-width: 500px;
    padding: 20px;
    transform: rotate(-5deg);
    animation: floating 3s ease-in-out infinite;
}

.floating-tshirt img {
    width: 100%;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
}

@keyframes floating {

    0%,
    100% {
        transform: rotate(-5deg) translateY(0);
    }

    50% {
        transform: rotate(-3deg) translateY(-20px);
    }
}

/* Features */
#features {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
}

.section-title h2 span {
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Boutique */
#boutique {
    padding-bottom: 100px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: var(--bg-card);
    color: var(--text-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--glass-border);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

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

.product-card {
    overflow: hidden;
    transition: var(--transition);
}

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

.product-img {
    height: 250px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

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

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

.product-info {
    padding: 15px;
}

.category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.price {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: #000;
    padding: 80px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-info .logo {
    margin-bottom: 20px;
}

.footer-info p {
    color: var(--text-muted);
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-social .social-icons {
    display: flex;
    gap: 15px;
}

.footer-social .social-icons a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 120px 20px 60px;
    }

    .hero-content p {
        margin: 0 auto 40px;
    }

    .hero-btns {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile Product Grid override */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .product-img {
        height: 160px !important;
    }

    .product-info h3 {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .price {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }

    /* Customize Page Header Adjustments */
    .nav-actions .btn-primary {
        padding: 8px 12px !important;
        font-size: 11px !important;
        min-width: auto;
    }

    /* Ensure Floating Toggle is visible on mobile */
    #sidebarToggle {
        display: flex !important;
        bottom: 20px;
        right: 20px;
    }

    /* Fix iOS Input Zoom */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Global Overflow Fix */
html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
}


/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    width: 350px;
    height: 100dvh;
    /* Mobile browser address bar fix */
    background: #0a0a0a;
    background: #0a0a0a;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    transition: var(--transition);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #111;
    border-radius: 8px;
}

.cart-item-previews {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cart-item-previews img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #151515;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 13px;
    color: #888;
}

.cart-item i {
    cursor: pointer;
    color: #ff3333;
    opacity: 0.7;
    transition: var(--transition);
}

.cart-item i:hover {
    opacity: 1;
}

.cart-footer {
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* Mobile Optimization - Customizer Sidebar */
@media (max-width: 768px) {
    .customizer-container {
        flex-direction: column;
        height: calc(100dvh - 80px);
        margin-top: 80px;
        overflow: hidden !important;
        /* Force no scroll */
    }

    .tools-sidebar {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 75dvh;
        z-index: 1100;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 20px 0 0;
        border-top: 1px solid var(--glass-border);
        overflow-y: auto;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .tools-sidebar.active {
        transform: translateY(0);
    }

    .canvas-area {
        height: 100%;
        /* Fill the container exactly */
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        overflow: hidden !important;
        /* Prevent scroll */
        position: relative;
    }

    .canvas-container {
        margin: 0 auto;
        max-width: 100%;
        max-height: 100%;
    }

    #sidebarToggle {
        display: flex;
    }
}

#sidebarToggle {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1200;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 94, 0, 0.4);
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

#sidebarToggle:active {
    transform: scale(0.9);
}

/* FAQ Section */
.faq-grid {
    display: grid;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    padding: 25px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-left: 3px solid transparent;
    /* Accent border */
    transition: var(--transition);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    padding-right: 20px;
}

.faq-question i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    opacity: 0.7;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
}

.faq-item.active {
    background: rgba(255, 255, 255, 0.08);
    /* Slightly lighter background */
    border-left-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    /* Increased max-height for safety */
    padding-top: 20px;
    opacity: 1;
}

.faq-item.active .faq-question h3 {
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
    opacity: 1;
}

.faq-item:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(255, 94, 0, 0.4);
}