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

html {
    scroll-behavior: smooth;
}

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #888888;
    --gray-dark: #333333;
    --font-main: 'Helvetica Neue', Arial, sans-serif;
}

/* Dark theme */
body.dark-theme {
    --black: #ffffff;
    --white: #0a0a0a;
    --gray-light: #1a1a1a;
    --gray: #888888;
    --gray-dark: #cccccc;
    background-color: #050505;
}

body.dark-theme .header {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 50%, #1a1a1a 100%);
}

body.dark-theme .section-title {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-theme .product-card {
    background: #111;
}

body.dark-theme .sale {
    background: #111;
}

body.dark-theme .contacts-content {
    background: #111;
}

body.dark-theme .drop {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

body.dark-theme .footer {
    background: #000;
}

body.dark-theme .modal-content {
    background: #0a0a0a;
    color: #ffffff;
}

body.dark-theme input {
    background: #111;
    border-color: #333;
    color: #ffffff;
}

body.dark-theme .btn-primary {
    background: #ffffff;
    color: #000000;
}

body.dark-theme .btn-primary:hover {
    background: #cccccc;
}

body.dark-theme .cart-item {
    border-bottom-color: #333;
}

body.dark-theme .product-detail-image {
    background: #111;
}

body.dark-theme .color-option,
body.dark-theme .size-option {
    border-color: #333;
}

body.dark-theme .size-option.selected {
    background: #ffffff;
    color: #000000;
}

body.dark-theme .mobile-nav {
    background: #0a0a0a;
}

body.dark-theme .mobile-nav a {
    border-bottom-color: #222;
}

body.dark-theme .mobile-nav a:hover {
    background: #111;
}

body.dark-theme .toast {
    background: #1a1a1a;
    color: #ffffff;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

/* 3D Logo */
.logo-container {
    perspective: 1000px;
}

.logo-3d {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--black);
    text-transform: uppercase;
    animation: rotate3d 8s infinite linear;
    transform-style: preserve-3d;
    display: inline-block;
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: rotateY(180deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(360deg) rotateX(0deg);
    }
    75% {
        transform: rotateY(180deg) rotateX(-10deg);
    }
    100% {
        transform: rotateY(720deg) rotateX(0deg);
    }
}

/* Navigation */
.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--black);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--black);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--gray);
}

.nav-link:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    position: relative;
    padding: 0.5rem;
    color: var(--black);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.btn-icon:hover {
    color: var(--gray);
    transform: scale(1.15);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover::before {
    width: 40px;
    height: 40px;
}

/* Theme toggle icons */
.theme-icon-sun,
.theme-icon-moon {
    transition: opacity 0.3s ease;
}

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

/* Main */
.main {
    padding-top: 100px;
    min-height: 100vh;
    overflow: visible;
}

/* Product Page */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    overflow: visible;
}

/* Hero */
.hero {
    text-align: center;
    padding: 8rem 2rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    background-size: 200% 200%;
    animation: heroGradient 8s ease infinite;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
    animation: heroFloat 6s ease-in-out infinite;
}

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

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 4rem;
    letter-spacing: 20px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--gray);
    text-transform: uppercase;
}

/* Sections */
.section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 5rem;
    margin-top: 10px;
    color: var(--black);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.section-title:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) translateY(-2px);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 280px);
    gap: 2rem;
    justify-content: center;
    justify-items: center;
    margin: 0 auto;
    max-width: 600px;
    padding: 2rem 0;
}

.products-grid .product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }

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

/* Product Card */
.product-card {
    background: var(--white);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    font-size: 3rem;
    color: var(--gray);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    color: var(--black);
}

.product-price.old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* Sale Section */
.sale {
    background: var(--gray-light);
}

/* Contacts */
.contacts {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.contacts-content {
    text-align: center;
    color: var(--gray);
    padding: 3rem;
    background: var(--gray-light);
    border-radius: 8px;
}

.contacts-content p {
    margin-bottom: 0.5rem;
}

/* Drop */
.drop {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.drop::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: dropPulse 4s ease-in-out infinite;
}

@keyframes dropPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.drop-text {
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gray);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--black);
    color: var(--gray);
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--gray);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--black);
}

.modal-content h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    text-align: center;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    padding: 1rem;
    border: 1px solid var(--gray-light);
    font-size: 1rem;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--black);
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

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

.btn-full {
    width: 100%;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--black);
    text-decoration: underline;
}

/* Cart Modal */
.modal-cart-content {
    max-width: 600px;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 2rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cart-item-name {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.cart-item-options {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 600;
}

.cart-item-remove {
    color: var(--gray);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.cart-item-remove:hover {
    color: var(--black);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1.5rem 0;
    border-top: 2px solid var(--black);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 0;
    padding-top: 60px;
}

.product-detail-info {
    padding-top: 20px;
}

.product-detail-image {
    background: var(--gray-light);
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-detail-info h1 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.product-detail-price .old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 1.2rem;
    margin-right: 1rem;
}

.product-options {
    margin-bottom: 2rem;
}

.product-options label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.color-options,
.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-option,
.size-option {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.color-option::before,
.size-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--black);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.color-option:hover::before,
.size-option:hover::before {
    width: 60px;
    height: 60px;
    opacity: 0.1;
}

.color-option:hover,
.color-option.selected,
.size-option:hover,
.size-option.selected {
    border-color: var(--black);
    transform: scale(1.05);
}

.color-option.selected::before,
.size-option.selected::before {
    width: 60px;
    height: 60px;
    opacity: 0.15;
}

.size-option {
    width: auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.size-option.selected {
    background: var(--black);
    color: var(--white);
    transform: scale(1.1);
}

.product-description {
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.btn-add-to-cart {
    width: 100%;
    padding: 1.5rem;
    background: var(--black);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1rem;
    transition: background 0.3s;
}

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

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--black);
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--gray-light);
    transition: background 0.3s;
}

.mobile-nav a:hover {
    background: var(--gray-light);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
    opacity: 0;
    transform: translateX(100%);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

.skeleton-card {
    border-radius: 4px;
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
}

.skeleton-text {
    height: 20px;
    margin: 10px 0;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 10px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
    }
}

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

    .hero-title {
        font-size: 2rem;
        letter-spacing: 5px;
    }
}
