/* ============================================
   ESTILOS GENERALES - Don Paulino Tienda
   ============================================ */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #d32f2f;
    --accent-color: #d32f2f;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #d32f2f;
    --light-gray: #f5f5f5;
    --dark-gray: #2d2d2d;
    --border-color: #333;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ============================================
   HEADER
   ============================================ */

.header-top {
    background-color: var(--dark-gray);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info span {
    margin-right: 30px;
}

.header-info i,
.header-user i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.header-user a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: var(--transition);
}

.header-user a:hover {
    color: var(--secondary-color);
}

.header-main {
    background-color: white;
    padding: 0;
    height: 8vw;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    margin: 0;
    width: 100%;
}

.header-main .container {
    width: 100%;
    min-width: 100%;
    display: flex;
    margin-inline: 0;
    align-items: center;
    justify-content: center;

}

.header-main-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
    margin-right: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 0;
    background-color: transparent;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 i {
    color: var(--accent-color);
}

.logo p {
    font-size: 0.85rem;
    color: #666;
}

.header-search {
    flex: 1;
    max-width: 60vw;
    margin-inline: 0;
}

.header-search form {
    display: flex;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.header-search input::placeholder {
    color: #999;
}

.header-search button {
    padding: 12px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    background-color: #2980b9;
}

.header-cart {
    display: flex;
    align-items: center;
    margin-left: 0;
    flex-shrink: 0;
    width: 5vw;
}

.header-cart a {
    position: relative;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.header-cart a:hover {
    color: var(--secondary-color);
}

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

/* ============================================
   NAVBAR
   ============================================ */

/* NAVBAR */
.navbar {
    background-color: var(--primary-color);
    padding: 12px 0;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    color: #f8fafc;
    font-weight: 500;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* DROPDOWN */
.dropdown {
    position: relative;
}

.dropdown-btn i:last-child {
    font-size: 0.7em;
    margin-left: 4px;
}

/* MEGA MENU (vertical) */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    transform: translateY(6px);
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid rgba(9, 30, 66, 0.04);
    box-shadow: 0 12px 30px rgba(8, 15, 25, 0.08);
    padding: 6px 6px;
    display: block;
    width: 260px;
    max-width: min(92vw, 320px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 1200;
}

/* Clases activas para mostrar */
.dropdown-menu.open,
.dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Column style (vertical list) */
.dropdown-menu .category-column {
    padding: 6px 0;
    min-width: 100%;
    display: block;
    border-bottom: 1px solid rgba(9, 30, 66, 0.04);
    position: relative;
}

.dropdown-menu .category-column:last-child {
    border-bottom: none;
}

/* Title (uniform) */
.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    min-height: 44px;
    line-height: 1;
    box-sizing: border-box;
}

/* Subcategory flyout (desktop) */
.subcategory-list {
    position: absolute;
    top: 0;
    left: 100%;
    margin: 0;
    padding: 12px;
    width: 260px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(8, 15, 25, 0.08);
    border: 1px solid rgba(9, 30, 66, 0.04);
    list-style: none;
    transform: translateX(8px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
    z-index: 1250;
    max-height: 60vh;
    overflow: auto;
}

.subcategory-list.expanded {
    transform: translateX(0) scale(1);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.subcategory-list.align-left {
    left: auto;
    right: 100%;
    transform: translateX(-8px) scale(0.98);
}

.subcategory-item {
    color: #475569;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 150ms ease, color 150ms ease, transform 120ms ease;
    display: block;
}

.subcategory-item:hover,
.subcategory-item:focus {
    background: rgba(13, 110, 253, 0.06);
    color: #0f172a;
    transform: translateX(4px);
    outline: none;
}

/* Mobile: submenus se apilan debajo del título (hidden by default, open on click) */
@media (max-width: 768px) {
    .subcategory-list {
        position: static;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        padding-left: 12px;
        margin-top: 8px;
        background: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        transition: max-height 220ms ease, opacity 180ms ease, visibility 0s linear 180ms;
    }

    .subcategory-list.expanded {
        opacity: 1;
        visibility: visible;
        max-height: 800px;
        overflow: visible;
    }

    .category-column {
        padding: 10px 6px;
    }
}

/* Toggle button for categories */
#categories-toggle {
    font-size: 0.95rem;
}

.category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    color: #0f172a;
    border-radius: 8px;
    line-height: 1;
    min-height: 44px;
    box-sizing: border-box;
}

.category-toggle:focus {
    outline: 3px solid rgba(29, 78, 216, 0.12);
    outline-offset: 3px;
}

.category-toggle .fa-chevron-right {
    transition: transform 180ms ease;
    margin-left: 8px;
}

.category-toggle[aria-expanded="true"] .fa-chevron-right {
    transform: rotate(90deg);
}

/* Hover unify */
.category-toggle:hover,
.category-title:hover {
    background: rgba(13, 110, 253, 0.04);
    color: #0f172a;
}

/* Scrollbar style for modern browsers */
.dropdown-menu::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(9, 30, 66, 0.08);
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

/* Mobile: stack columns, full-width cards */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 12px;
        background: transparent;
        opacity: 1;
        pointer-events: auto;
        max-height: none;
        overflow: visible;
    }

    .dropdown-menu .category-column {
        background: #ffffff;
        border-radius: 8px;
        padding: 12px;
        border-right: none;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    }

    .subcategory-item {
        padding-left: 12px;
    }
}

/* Improve spacing around nav */
.nav-content .dropdown {
    margin-right: 8px;
}

/* Improve small touch target */
.dropdown-btn {
    padding: 10px 14px;
    border-radius: 8px;
}

/* Hover/focus effect for nav button */
.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-btn:focus {
    outline: 3px solid rgba(29, 78, 216, 0.15);
    outline-offset: 3px;
}

/* Chevron rotation */
.dropdown .fa-chevron-down {
    transition: transform 180ms ease;
}

.dropdown.open .fa-chevron-down {
    transform: rotate(180deg);
}

/* COLUMNAS (vertical list) */
.category-column {
    display: block;
    position: relative;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(9, 30, 66, 0.04);
}

.category-column:last-child {
    border-bottom: none;
}

.category-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 4px;
    display: block;
}

.category-title:hover {
    color: #dc2626;
}

.subcategory-item {
    font-size: 0.87rem;
    color: #475569;
    text-decoration: none;
    line-height: 1.35;
    transition: 0.15s;
}

.subcategory-item:hover {
    color: #dc2626;
}

/* MOBILE */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        background: transparent;
        padding: 10px 0 0;
        min-width: unset;
        max-width: unset;
        grid-template-columns: 1fr;
    }

    .category-title {
        color: #f8fafc;
    }

    .subcategory-item {
        color: #cbd5e1;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--dark-gray);
    color: white;
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.btn-disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   CATEGORÍAS
   ============================================ */

.categories-section {
    padding: 60px 20px;
    background-color: white;
}

.categories-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.category-card {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background-color: var(--light-gray);
    transition: var(--transition);
    text-decoration: none;
    color: #333;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100px;
    max-height: 100px;
}

.category-card h3 {
    margin-bottom: 10px;
}

.category-card p {
    font-size: 0.9rem;
    color: #666;
}

/* ============================================
   PRODUCTOS
   ============================================ */

.featured-section,
.discount-section {
    padding: 60px 20px;
    background-color: white;
    margin: 20px 0;
}

.featured-section h2,
.discount-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
}

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

.latest-stock-section {
    padding: 40px 0px;
    background-color: #fff;
    margin: 30px 0;
    max-width: 100%;
    width: 100%;
}

.latest-stock-section h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2.3rem;
    color: var(--primary-color);
}

.latest-stock-carousel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    display: block;
    margin: 0 auto;
}

.carousel-view {
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.carousel-wrapper {
    padding: 0 48px;
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.carousel-track .product-card {
    display: flex;
    box-sizing: border-box;
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 auto;

}

.carousel-track .product-card.carousel-active {
    flex-direction: column;
    opacity: 1;
}

.carousel-track .product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.carousel-window {
    overflow: hidden;
    position: relative;
    width: 100%;
        padding: 10px 20px; /* 👈 ESTO ES LA CLAVE */

}


.carousel-track .product-card {
    padding: 0;
}






.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    z-index: 20;
    transition: background-color 0.25s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.06);
    background: rgba(255, 255, 255, 1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background-color: #ffffff;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    pointer-events: none;
}

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

.discount-badge,
.stock-badge,
.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
}

.new-badge {
    background-color: var(--primary-color);
    color: white;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.discount-badge.large {
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    font-size: 1.2rem;
}

.stock-badge {
    background-color: #95a5a6;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    top: 5px !important;
    right: 5px !important;
}

.product-info {
    padding: 15px 15px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.product-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.product-brand {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.product-price {
    margin-top: auto;
    margin-bottom: 15px;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 10px;
}

.price-final {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 10;
    margin-top: 0 auto;
}

.product-actions a,
.product-actions button {
    flex: 1;
    pointer-events: auto;
}

/* ============================================
   PÁGINA DE PRODUCTOS
   ============================================ */

.products-section {
    padding: 40px 20px;
    min-height: 70vh;
}

.products-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.filters-sidebar {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filters-sidebar h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range input {
    flex: 1;
}

.price-range span {
    flex: 0 0 auto;
}

.products-main {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
}

.products-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.no-products {
    text-align: center;
    padding: 60px 20px;
}

.no-products i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--secondary-color);
    color: white;
}

.page-link.active {
    background-color: var(--secondary-color);
    color: white;
}

/* ============================================
   PRODUCTO DETALLADO
   ============================================ */

.product-detail {
    padding: 40px 20px;
    min-height: 70vh;
}

.breadcrumb {
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
}

.product-detail-image {
    position: relative;
}

.image-viewer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image-container {
    position: relative;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 60%, #f0f4ff 100%);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e8eaf0;
    box-shadow: 0 4px 24px rgba(60, 80, 140, 0.10), 0 1.5px 6px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
}

.main-image-container:hover {
    box-shadow: 0 8px 36px rgba(60, 80, 140, 0.16), 0 2px 8px rgba(0,0,0,0.06);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.main-image-container:hover .main-image {
    transform: scale(1.04);
}

.image-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.92);
    color: #232b3a;
    border: 1.5px solid #e0e4ef;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    backdrop-filter: blur(4px);
}

.image-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(220, 40, 40, 0.25);
}

.image-nav.prev {
    left: 12px;
}

.image-nav.next {
    right: 12px;
}

.product-detail-image img {
    border-radius: 8px;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    scroll-behavior: smooth;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnail {
    width: 72px;
    height: 72px;
    min-width: 72px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #e8eaf0;
    background: #f8f9fc;
    transition: all 0.25s ease;
    opacity: 0.65;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.08);
    border-color: #b0b8d0;
    box-shadow: 0 3px 10px rgba(60,80,140,0.13);
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(220, 40, 40, 0.18);
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.product-detail-price {
    margin: 20px 0;
}

.product-stock {
    margin: 20px 0;
}

.stock-available {
    color: var(--success-color);
}

.stock-unavailable {
    color: var(--danger-color);
}

.product-color {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #333;
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: inline-block;
    vertical-align: middle;
}

.color-palette {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    display: none;
    gap: 8px;
    align-items: center;
    padding: 8px;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    z-index: 20;
}

.color-picker-wrap.open .color-palette {
    display: flex;
}

.color-palette .swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: inline-block;
    cursor: pointer;
}

.color-palette .swatch:focus {
    outline: 2px solid rgba(0, 0, 0, 0.12);
}

.color-name-label {
    font-size: 0.9rem;
    color: #555;
}

.product-form {
    margin: 25px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.quantity-input.modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover:not(:disabled) {
    background: #007bff;
    color: #fff;
    transform: scale(1.05);
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quantity-input.modern input[type="number"] {
    width: 60px;
    padding: 8px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input.modern input[type="number"]::-webkit-outer-spin-button,
.quantity-input.modern input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input.modern input[type="number"]::-moz-focus-inner {
    border: 0;
}

.qty-btn {
    padding: 8px 12px;
    border: none;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.quantity-input input {
    width: 60px;
    border: none;
    text-align: center;
    padding: 8px;
    font-size: 1rem;
}

.product-description {
    width: 100%;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
}

.product-description h3 {
    margin-block-end: 1%;
}

.product-description p {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 0.4;
}

.description-list {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 10px;
}

.description-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.product-contact {
    width: 100%;
    max-width: 360px;
    margin: 30px auto 0;
    padding: 20px;
    background: linear-gradient(180deg, #ffffff 0%, var(--light-gray) 100%);
    border: 2px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.product-contact h3 {
    font-size: 1.05rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.product-contact p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.product-contact a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.12s var(--transition), box-shadow 0.12s var(--transition);
}

.product-contact a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.product-contact a.btn .fab {
    font-size: 1.1rem;
}

@media (min-width: 900px) {
    .product-contact {
        margin-left: auto;
        text-align: left;
    }

    .product-contact h3 {
        justify-content: flex-start;
    }

    .product-contact p {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .product-contact a.btn {
        width: 100%;
    }
}


/* ============================================
   CARRITO
   ============================================ */




/* ============================================
   CONFIRMAR COMPRA
   ============================================ */

.confirm-purchase-section {
    padding: 50px 0 70px;
}

.confirm-purchase-section>.container>h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
}

.confirm-purchase-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.confirm-purchase-form {
    background-color: white;
    padding: 36px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    min-height: 220px;
    position: relative;
    z-index: 2;
}

.confirm-purchase-form h3 {
    color: var(--primary-color);
    margin-top: 32px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
    font-size: 1.15rem;
}

.confirm-purchase-form h3:first-child {
    margin-top: 0;
}

.confirm-purchase-form h3 i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.form-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--light-gray);
}

.step-connector {
    display: flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 18px;
    padding: 0 16px;
    color: var(--secondary-color);
    opacity: 0.5;
    font-size: 1.3rem;
}

.step-connector::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--secondary-color), var(--secondary-color));
    position: relative;
}

.step-connector::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--secondary-color);
    opacity: 0.5;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.step-indicator.active {
    opacity: 1;
}

.step-number {
    width: 42px;
    height: 42px;
    background-color: var(--light-gray);
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1rem;
}

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

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.step-indicator.completed .step-number {
    background-color: var(--secondary-color);
    color: white;
}

.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--light-gray);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 5px 0 10px 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.form-group+.form-group {
    margin-top: 20px;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    align-items: start;
    margin-bottom: 0;
}

.form-row+.form-group,
.form-group+.form-row,
.form-row+.form-row {
    margin-top: 20px;
}

/* Dentro de form-row, los grupos no deben tener margin-top entre sí */
.form-row>.form-group {
    margin-top: 0;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.payment-option {
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: var(--secondary-color);
    background-color: rgba(var(--secondary-rgb), 0.05);
}

.payment-label {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    gap: 14px;
    width: 100%;
}

.payment-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--secondary-color);
}

.payment-option input[type="radio"]:checked~.payment-info {
    color: var(--secondary-color);
}

.payment-option input[type="radio"]:checked+.payment-info {
    color: var(--secondary-color);
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: color 0.3s;
    flex-grow: 1;
}

.payment-info strong {
    font-size: 1rem;
}

.payment-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.btn-confirm {
    padding: 14px 32px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* label styles handled above in form-group label */

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    transition: all 0.2s;
    box-sizing: border-box;
    min-height: 46px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: white;
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
}

.form-group.checkbox input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-bottom: 0;
}

.confirm-purchase-summary {
    background-color: white;
    padding: 28px;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    z-index: 1;
}

.confirm-purchase-summary h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--light-gray);
}

.summary-divider {
    height: 1px;
    background: linear-gradient(to right, transparent 0%, var(--secondary-color) 50%, transparent 100%);
    margin: 20px 0;
    opacity: 0.4;
}

.confirm-purchase-login {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.confirm-purchase-login a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ============================================
   AUTENTICACIÓN
   ============================================ */

.login-section,
.register-section {
    padding: 60px 20px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.login-container,
.register-container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.login-container h1,
.register-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login-form,
.register-form {
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #fadbd8;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

.alert-success {
    background-color: #d5f4e6;
    color: #196f3d;
    border: 1px solid #a9dfbf;
}

.alert-warning {
    background-color: #fdebd0;
    color: #7d6608;
    border: 1px solid #f8d7da;
}

/* ============================================
   PAGO RESULTADO (pago-exitoso, pago-fallido)
   ============================================ */
.payment-result-section {
    padding: 60px 0;
}

.payment-result-card {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
    padding: 48px 40px;
    text-align: center;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.result-icon.success {
    color: #27ae60;
}

.result-icon.pending {
    color: #f39c12;
}

.result-icon.error {
    color: #e74c3c;
}

.payment-result-card h1 {
    margin-bottom: 12px;
    font-size: 1.8rem;
}

.payment-result-card p {
    color: #666;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--primary-color);
    color: white;
}

.footer-content {
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    justify-items: center;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

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

.social-links a:hover {
    background-color: var(--secondary-color);
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
}

.newsletter-form button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.footer-map {
    margin-bottom: 30px;
}

.footer-map h3 {
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.transfer-details {
    display: none;
    grid-column: 1 / -1;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-top: -4px;
}

.transfer-details.active {
    display: block;
}

.transfer-details h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transfer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ebebeb;
    font-size: 0.9rem;
}

.transfer-row:last-child {
    border-bottom: none;
}

.transfer-row .label {
    color: #666;
    font-weight: 500;
}

.transfer-row .value {
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

/* ============================================
   ESTILOS RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .confirm-purchase-content {
        gap: 30px;
    }

    .confirm-purchase-summary {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .header-main {
        height: auto;
        padding: 15px 0;
    }

    .header-main-content {
        flex-direction: column;
        gap: 15px;
        height: auto;
    }

    .logo {
        width: 100%;
        justify-content: flex-start;
    }

    .logo-image {
        height: 50px;
        max-width: 180px;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
    }

    .header-search input {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .header-cart {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .nav-content {
        overflow-x: auto;
    }

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

    .products-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
    }

    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .header-logo h1 {
        font-size: 1.3rem;
    }

    .logo p {
        display: none;
    }

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

    .hero-content p {
        font-size: 1rem;
    }

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

    .cart-table th,
    .cart-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .product-detail-image img {
        margin-bottom: 10px;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   FEATURES
   ============================================ */

.features-section {
    padding: 60px 20px;
    background-color: white;
}

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

.feature-card {
    text-align: center;
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.feature-card:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
}

/* ============================================
   PÁGINA DE CONTACTO
   ============================================ */

.contact-section {
    padding: 40px 20px;
    min-height: 70vh;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
}

.contact-form h3,
.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-info ul {
    list-style: none;
    margin-top: 15px;
}

.contact-info ul li {
    margin-bottom: 8px;
}

/* ============================================
   ÓRDENES
   ============================================ */

.orders-section {
    padding: 40px 20px;
    min-height: 70vh;
}

.no-orders {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: 8px;
}

.no-orders i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.orders-list {
    margin-top: 30px;
}

.order-card {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.order-date {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-shipped {
    background-color: #d4edda;
    color: #155724;
}

.status-delivered {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

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

.order-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.order-items-table th {
    background-color: var(--light-gray);
    font-weight: 600;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }

    .order-header {
        flex-direction: column;
    }

    .order-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile extra small */
@media (max-width: 480px) {
    .logo-image {
        height: 40px;
        max-width: 140px;
    }

    .header-main-content {
        gap: 15px;
    }

    .header-info span {
        font-size: 0.8rem;
    }
}

.image-hero {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
    display: block;
    background: none;
    padding-top:1%;
}

.image-hero::before {
    display: none;
}

.hero-banner-link {
    
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-decoration: none;
    background: #ffffff;
    padding: 0;
}

.hero-banner-image {
    border-radius: 12px;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    image-rendering: auto;
}

/* ============================================
   MODAL DE CONFIRMACIÓN
   ============================================ */

.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

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

.modal-header {
    padding: 24px 24px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-body {
    padding: 24px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.modal-footer .btn {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ============================================
  elimino las flechas del contador
   ============================================ */
.qty-field::-webkit-inner-spin-button,
.qty-field::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================
   MOBILE TUNING (non-breaking desktop)
   Keep at the end so it wins the cascade.
   ============================================ */

/* Helps the absolute cart positioning on mobile */
.header-main {
    position: relative;
}

/* Mobile-only UI (hidden on desktop) */
.mobile-menu-btn,
.mobile-drawer,
.mobile-drawer-overlay {
    display: none;
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .header-info span {
        margin-right: 14px;
    }

    .nav-content {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    /* Avoid tiny thumbnails due to vw sizing */
    .product-image {
        max-height: 220px;
    }

    /* Prevent layout break on narrow screens */
    .cart-items,
    .order-card {
        overflow-x: auto;
    }

    .cart-table,
    .order-items-table {
        min-width: 640px;
    }

    /* Fixed attachment is janky on mobile */
    .image-hero {
        background-attachment: scroll;
    }

    /* Hide current navbar on mobile (replaced by drawer) */
    .navbar {
        display: none;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        background: #ffffff;
        color: var(--primary-color);
        cursor: pointer;
        z-index: 50;
    }

    .mobile-menu-btn:focus-visible {
        outline: 3px solid rgba(29, 78, 216, 0.15);
        outline-offset: 3px;
    }

    /* Drawer */
    .mobile-drawer-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1100;
    }

    .mobile-drawer-overlay.open {
        display: block;
    }

    .mobile-drawer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(86vw, 360px);
        background: #ffffff;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        z-index: 1200;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.14);
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }

    /* Drawer inner styles now handled by extras.css (.mdr-* classes) */

    body.drawer-open {
        overflow: hidden;
    }

    /* Home: Categories — 2 columns grid */
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 4px 2px 10px;
        overflow-x: unset;
    }

    .category-card {
        min-width: unset;
        padding: 16px 12px;
    }

    .category-icon {
        height: 80px;
        font-size: 2rem;
    }

    .category-image {
        max-width: 70px;
        max-height: 70px;
    }

    .category-card h3 {
        font-size: 0.9rem;
    }

    .category-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .header-cart {
        top: 12px;
        right: 12px;
    }

    .product-image {
        max-height: 180px;
    }

    .thumbnail {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }

    .gallery-thumbnails {
        gap: 6px;
    }

    .image-nav {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .coupon-section {
        flex-direction: column;
    }

    .coupon-section input,
    .coupon-section button {
        width: 100%;
    }

    .mobile-menu-btn {
        top: 12px;
        left: 12px;
    }

    .category-card {
        min-width: unset;
    }
}

/* ============================================
   TRABAJOS (Lista pública y Detalle)
   Estilos centrados en la experiencia visual de los usuarios
   ============================================ */

.works-section {
    padding: 72px 20px;
    background: linear-gradient(180deg, #fbfcfd 0%, #f7f9fb 100%);
}
.works-container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h1 { font-size: 34px; color: var(--primary-color); margin-bottom: 6px; }
.section-title p { color: #6b7280; font-size: 15px; }

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.work-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(16,24,40,0.06);
    transition: transform 260ms cubic-bezier(.2,.9,.3,1), box-shadow 260ms ease, border-color 260ms ease;
    text-decoration: none;
    color: inherit;
}
.work-card:hover { transform: translateY(-8px); box-shadow: 0 18px 46px rgba(16,24,40,0.12); }

.work-card .work-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: linear-gradient(180deg,#eef2f6 0%, #e9eef4 100%);
    transition: transform 350ms ease, filter 350ms ease;
}
.work-card:hover .work-image { transform: scale(1.06); }

.work-content {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-title { font-size: 18px; font-weight: 700; color: var(--primary-color); line-height: 1.25; }
.work-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.work-meta span { color: #9ca3af; font-size: 13px; }
.work-badge { display: inline-block; background: var(--secondary-color); color: white; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* Galería y modal específicos */
#mediaModal, #galleryModal { display: none; position: fixed; z-index: 1200; inset: 0; align-items: center; justify-content: center; background: rgba(2,6,23,0.7); }
#mediaModal.active, #galleryModal.active { display: flex; }

#mediaModal .modal-content, #galleryModal .modal-content {
    width: min(1100px, 96%);
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-media { flex: 1; display: flex; align-items: center; justify-content: center; background: #111; min-height: 420px; }
.modal-media img, .modal-media video { max-width: 100%; max-height: 100%; object-fit: contain; }

.modal-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; background: rgba(0,0,0,0.6); }
.modal-btn { background: white; border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 20px; display:flex;align-items:center;justify-content:center; }
.modal-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; font-size: 22px; cursor: pointer; z-index: 10; }

.gallery-section { margin: 36px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-item { border-radius: 10px; overflow: hidden; background: #f8fafc; cursor: pointer; position: relative; box-shadow: 0 6px 18px rgba(2,6,23,0.06); }
.gallery-item img, .gallery-item video { width: 100%; height: 200px; object-fit: cover; display: block; }
.gallery-item .video-play-icon { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; color: white; font-size: 34px; text-shadow: 0 6px 20px rgba(0,0,0,0.6); }

.empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px;
    margin: 32px auto;
    max-width: 760px;
    border-radius: 12px;
    background: linear-gradient(180deg,#ffffff,#fbfdff);
    box-shadow: 0 12px 36px rgba(2,6,23,0.06);
    text-align: center;
}
.empty-message svg { width: 96px; height: 96px; color: var(--secondary-color); opacity: 0.95; }
.empty-message h3 { font-size: 20px; color: var(--primary-color); margin: 0; }
.empty-message p { color: #6b7280; font-size: 15px; margin: 0; max-width: 640px; }
.empty-actions { display:flex; gap:12px; align-items:center; justify-content:center; margin-top:8px; }

.whatsapp-cta { margin: 48px auto; max-width: 780px; text-align: center; padding: 40px 28px; background: linear-gradient(180deg,#ffffff,#fbfdff); border-radius: 12px; border: 1px solid rgba(2,6,23,0.04); }
.whatsapp-cta h3 { font-size: 26px; margin-bottom: 10px; color: var(--primary-color); }
.btn-whatsapp { background: #25D366; color: white; padding: 12px 28px; border-radius: 999px; font-weight: 700; display: inline-flex; gap: 12px; align-items: center; }

.related-works-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(16,24,40,0.04); }
.related-works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.related-work-card { border-radius: 10px; overflow: hidden; background: white; box-shadow: 0 8px 20px rgba(2,6,23,0.06); transition: transform 260ms ease; }
.related-work-card:hover { transform: translateY(-6px); }
.related-work-image { width: 100%; height: 160px; object-fit: cover; }
.related-work-title { padding: 12px; font-weight: 600; color: var(--primary-color); }

@media (max-width: 900px) {
    .work-card .work-image { height: 200px; }
    .gallery-item img, .gallery-item video { height: 160px; }
}

@media (max-width: 480px) {
    .works-section { padding: 32px 12px; }
    .work-card .work-image { height: 180px; }
    .works-grid { gap: 14px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .whatsapp-cta { padding: 22px 16px; }
}