:root {
    --primary-color: #ff0000;
    /* Red */
    --secondary-color: #000000;
    --accent-color: #ffffff;
    --text-color: #1a1a1a;
    --light-gray: #f9f9f9;
    --dark-gray: #111111;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Smoother ease */
}

/* Custom Cursor Removed */

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.fade-up-element {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeUp 0.8s ease-out forwards;
}

/* Ajustes finos para móviles muy pequeños (≈360x740) */
@media (max-width: 400px) {
    header {
        padding: 0.6rem 4%;
    }

    .logo {
        font-size: 1.2rem;
        letter-spacing: 1.2px;
    }

    .nav-icons {
        gap: 0.8rem;
    }

    .auth-buttons .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .nav-links {
        width: 220px;
        padding: 4rem 1.25rem;
    }

    .hero {
        height: 60vh;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.2rem;
    }

    .products-grid {
        padding: 1.25rem 4%;
        gap: 0.9rem;
    }

    .product-image {
        height: 220px;
    }

    .product-info {
        padding: 0.9rem;
    }

    .btn {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }

    .product-detail {
        gap: 1.5rem;
        padding: 1.5rem 4%;
    }

    .main-image {
        height: 320px;
    }

    .thumbnails {
        gap: 0.6rem;
    }

    .cart-modal {
        max-width: 100%;
    }

    .cart-modal-content {
        padding: 14px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.section-title {
    font-family: 'Cinzel', serif;
    font-weight: 400;
    letter-spacing: 1px;
}

body {
    background-color: var(--accent-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
    /* Offset for fixed header */
}

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

/* Header Styles */
header {
    background-color: var(--secondary-color);
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent-color);
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    transition: var(--transition);
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

/* Ensure header logo image is clearly visible */
.site-logo {
    display: block;
    height: 56px;
    width: auto;
    border-radius: 6px;
    padding: 0;
    background: none;
    border: 0;
    filter: none;
    outline: none;
}

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

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

.cart {
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Main Content */
main {
    min-height: 80vh;
}

/* Hero Section */
.hero {
    background:
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('/static/images/pasarela/pasarela-1.png');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--accent-color);
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Logo positioned within hero content overlay */
.hero-logo {
    display: inline-block;
    height: clamp(64px, 10vw, 120px);
    width: auto;
    border-radius: 8px;
    padding: 0;
    background: none;
    border: 0;
    margin-bottom: 1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4rem;
    padding: 6rem 8%;
}

.product-card {
    background: var(--accent-color);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--accent-color);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-top: 1rem;
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--accent-color);
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 10%;
    align-items: center;
}

.product-images {
    display: grid;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Cart Modal */
.cart {
    position: relative;
    cursor: pointer;
    padding: 10px;
    margin-left: 20px;
}

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

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
}

.cart-modal-content {
    padding: 20px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

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

.cart-item h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

.cart-item p {
    margin: 3px 0;
    font-size: 14px;
    color: #666;
}

.quantity-controls {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.quantity-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.item-total {
    font-weight: bold;
    color: var(--text-color) !important;
    font-size: 16px;
}

.remove-item {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    padding: 5px;
}

.cart-total {
    text-align: right;
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.checkout-btn:hover {
    background-color: #333;
}

/* Empty cart message */
.empty-cart-message {
    text-align: center;
    padding: 40px 0;
    color: #888;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.size-selector {
    margin: 1.5rem 0;
}

.size-selector select {
    padding: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: var(--accent-color);
}

.product-description {
    margin: 2rem 0;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Overlay para menú móvil */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 999;
}

.nav-overlay.show {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

/* Responsive Utilities */
.mobile-only {
    display: none;
}

.btn-icon {
    display: none;
}

/* Responsive Design */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: 2rem 5%;
    }

    .main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    /* Mobile Auth Buttons */
    .btn-text {
        display: none;
    }

    .btn-icon {
        display: inline-block;
        font-size: 1.1rem;
    }

    .mobile-icon-btn {
        padding: 0.5rem 0.8rem !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100vh;
        background: var(--secondary-color);
        flex-direction: column;
        padding: 5rem 2rem;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s ease;
        transform: translateX(100%);
        z-index: 1002;
        /* por encima del overlay y header */
    }

    .nav-links.active {
        transform: translateX(0);
    }

    body.menu-open .nav-links {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        word-wrap: break-word;
        hyphens: auto;
        padding: 0 10px;
    }

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

    .product-image {
        height: 250px;
    }
}

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

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

    .product-detail {
        padding: 1rem;
    }

    .main-image {
        height: 300px;
    }
}

/* Admin Orders micro spacing */
.admin-orders .card-header {
    padding: .75rem 1rem;
}

.admin-orders .card {
    margin-bottom: 1rem;
}

.admin-orders .table th,
.admin-orders .table td {
    padding: .5rem .75rem;
}

.admin-orders .row.g-3 {
    --bs-gutter-y: .75rem;
    --bs-gutter-x: .75rem;
}

/* Product cards: 360–400px pleasant proportions */
@media (max-width: 400px) {
    .products-grid {
        gap: 1rem;
    }

    .products-grid .product-image {
        aspect-ratio: 4 / 5;
        height: auto !important;
    }

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

    .product-card .product-info {
        padding: 1rem;
    }

    .product-card .product-title {
        font-size: .95rem;
    }

    .product-card .product-price {
        font-size: 1rem;
    }

    .product-actions .add-to-cart,
    .product-card .btn {
        width: 100%;
        margin-top: .75rem;
        padding: .6rem 1rem;
        font-size: .85rem;
    }
}