/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #C77DFF;
    --primary-dark: #7B2CBF;
    --primary-light: #E0AAFF;
    --secondary-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

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

/* ===== Header ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.logo svg {
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-list a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.cart-count {
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    height: 600px;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.9), rgba(199, 125, 255, 0.8)), 
                url('./images/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* ===== Features Section ===== */
.features {
    padding: 5rem 0;
    background: var(--bg-light);
}

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

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

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

/* ===== Sections ===== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.popular-products {
    padding: 5rem 0;
}

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

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: var(--bg-light);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.btn-add-cart {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* ===== About Section ===== */
.about {
    padding: 5rem 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.about-list {
    margin-top: 2rem;
}

.about-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
}

.about-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.25rem;
}

.about-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===== Catalog Page ===== */
.catalog {
    padding: 4rem 0;
}

.catalog-filters {
    margin-bottom: 2rem;
}

.catalog-filters h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 24px;
    background: var(--white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 500;
}

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

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.product-count {
    color: var(--text-light);
    font-weight: 500;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options label {
    font-weight: 500;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.95rem;
}

/* ===== Product Detail Page ===== */
.product-detail {
    padding: 2rem 0 4rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

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

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    aspect-ratio: 1;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 2.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 2rem;
}

.product-meta {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.product-meta p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.quantity-selector {
    margin-bottom: 2rem;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
}

.quantity-btn:hover {
    background: var(--bg-light);
}

.quantity-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.product-actions .btn {
    flex: 1;
}

/* ===== Product Tabs ===== */
.product-tabs {
    margin-top: 4rem;
    border-top: 2px solid var(--border-color);
    padding-top: 3rem;
}

.tabs-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.125rem;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-dark);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.tab-panel p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.125rem;
}

.related-products {
    margin-top: 4rem;
}

.related-products h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

/* ===== Cart Page ===== */
.cart-section {
    padding: 3rem 0 5rem;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-item-quantity button {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    font-weight: bold;
}

.cart-item-quantity input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.cart-item-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.btn-remove {
    color: #EF4444;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.btn-remove:hover {
    background: #FEE2E2;
}

.cart-summary {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.summary-divider {
    height: 2px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1rem;
}

.btn-checkout {
    width: 100%;
    margin: 1.5rem 0 1rem;
}

.cart-summary .btn-secondary {
    width: 100%;
}

.empty-cart {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-cart svg {
    margin: 0 auto 2rem;
}

.empty-cart h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* ===== Thank You Page ===== */
.thank-you-section {
    padding: 4rem 0 6rem;
}

.thank-you-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    margin: 0 auto 2rem;
    animation: scaleIn 0.5s ease;
}

.thank-you-content h1 {
    font-size: 3rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.thank-you-message {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.order-detail h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.order-number,
.order-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.order-steps {
    margin: 3rem 0;
    text-align: left;
}

.order-steps h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

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

.step {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.step.active {
    background: var(--primary-light);
}

.step-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.step.active .step-icon {
    background: var(--secondary-color);
    color: var(--white);
}

.next-steps {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: left;
}

.next-steps h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.next-steps ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--text-light);
}

.next-steps svg {
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.help-section {
    color: var(--text-light);
    font-size: 1rem;
}

.help-section a {
    color: var(--primary-color);
    font-weight: 600;
}

.help-section a:hover {
    color: var(--primary-dark);
}

/* ===== Footer ===== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-section p {
    color: #D1D5DB;
    line-height: 1.8;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #D1D5DB;
}

.footer-section ul li a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9CA3AF;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
    }

    .nav.active {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0 1.5rem;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list a {
        display: block;
        padding: 1rem 0;
    }

    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

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

    .page-header h1 {
        font-size: 2rem;
    }

    .thank-you-content h1 {
        font-size: 2rem;
    }

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

    .thank-you-actions {
        flex-direction: column;
    }

    .product-actions {
        flex-direction: column;
    }

    .tabs-header {
        overflow-x: auto;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .order-info {
        grid-template-columns: 1fr;
    }

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