/* ===========================
   RESET & BASE STYLES
   =========================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: #1a1a1a;
    background-color: #fafafa;
    background-image: url("images/glasses and hats.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

button,
select,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

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

/* Custom brand font */
@font-face {
    font-family: 'RusticRoadway';
    src: url('fonts/RusticRoadway.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,250,0.9));
    border-bottom: 1px solid rgba(17,17,17,0.06);
    backdrop-filter: blur(6px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: #0f172a;
    margin: 0;
    justify-self: center;
    text-align: center;
    font-family: 'RusticRoadway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.brand-icon-right {
    width: 70px;
    height: auto;
    justify-self: end;
    display: block;
}

@media (max-width: 480px) {
    .brand-icon-right {
        width: 48px;
    }
}

.header-menu-btn {
    width: 50px;
    height: 50px;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: #fff;

    /* 360° circular stroke */
    border: 1px solid #cec8c8;
    border-radius: 50%;

    padding: 0;
    cursor: pointer;

    transition: transform 0.2s ease;
}

.header-menu-btn span {
    width: 18px;
    height: 1px;

    display: block;

    background: #000;
    border-radius: 999px;
}

/* ===========================
   CATEGORY NAVIGATION
   =========================== */

.category-nav {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 120;
    width: min(92vw, 560px);
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 1.5rem;
    box-shadow: 0 14px 32px rgba(17, 17, 17, 0.08);
    backdrop-filter: blur(10px);
}

.category-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s ease;
}

body.bg-ready .category-nav-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-btn {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.7rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d6d6d;
    background: transparent;
    border-radius: 1rem;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}

.category-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
}

.category-btn:hover {
    color: #111111;
    background: transparent;
}

.category-btn--active {
    color: #111111;
    background: transparent;
}

.category-btn--active::before {
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0.35rem;
    height: 2px;
    border-radius: 999px;
    background: #111111;
    animation: activeIndicator 0.25s ease;
}

.category-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    opacity: 0.85;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.category-btn:hover .category-icon,
.category-btn--active .category-icon {
    opacity: 1;
    transform: scale(1.18);
}

@keyframes activeIndicator {
    from {
        transform: scaleX(0.5);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ===========================
   MAIN CONTENT
   =========================== */

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 7rem;
}

/* ===========================
   PRODUCTS GRID
   =========================== */

.products-section {
    width: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    animation: none;
    transition: opacity 0.9s ease, transform 0.9s ease, visibility 0.9s ease;
}

body.bg-ready .products-grid {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: fadeIn 0.9s ease-out;
}

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

/* Product Card */
.product-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    animation: fadeIn 0.6s ease-out;
    background: #fff;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(17, 17, 17, 0.06);
    border-color: rgba(17, 17, 17, 0.12);
}

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    background-color: #eee;
    border-radius: 0;
    margin: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .product-image {
    opacity: 0.98;
    transform: scale(1.01);
}

.product-card-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1rem 1rem 0.7rem;
    color: #171717;
}

.product-card-pricing {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 1rem 1rem;
}

.product-card-price-old {
    font-size: 0.8rem;
    color: #9a9a9a;
    text-decoration: line-through;
}

.product-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #171717;
}

/* ===========================
   DRAWER (MODAL)
   =========================== */

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.drawer.active {
    opacity: 1;
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.drawer-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.4s ease-out;
    overflow-y: auto;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.drawer.active .drawer-panel {
    animation: slideInRight 0.4s ease-out;
}

.drawer-close {
    position: absolute;
    top: 2.5rem;
    left: 1.5rem;
    z-index: 10;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
}

.drawer-close-icon {
    width: 33px;
    height: 33px;
    object-fit: contain;
    display: block;
}

.drawer-close:hover {
    transform: scale(1.05);
}

.drawer-close span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.drawer-content {
    padding: 4rem 2rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ===========================
   PRODUCT DRAWER
   =========================== */

.product-image-gallery {
    margin-bottom: 2rem;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 1.3rem;
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.06);
}

.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background-color: #f5f5f5;
    border-radius: 0.95rem;
    display: block;
    margin: 0 0 1rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    background-color: #f5f5f5;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.product-thumbnail:hover {
    border-color: #1a1a1a;
    transform: scale(1.05);
}

.product-thumbnail.active {
    border-color: #1a1a1a;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-type {
    display: none;
}

.product-pricing {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.product-price-old {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.product-price-current {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.product-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.product-action-label {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #666;
    margin-bottom: 0.9rem;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
    margin-bottom: 30px;
}

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

.btn-product-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #fff;
    color: #111;
}

.btn-product-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
}

#btn-product-whatsapp {
    background: linear-gradient(135deg, #f0fdf4 0%, #d9fbe8 100%);
    border-color: rgba(22, 163, 74, 0.18);
    color: #0f172a;
}

#btn-product-instagram {
    background: linear-gradient(135deg, #fff7f3 0%, #f6e7ff 100%);
    border-color: rgba(168, 85, 247, 0.16);
    color: #0f172a;
}

.btn-product-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

/* ===========================
   CONTACT DRAWER
   =========================== */

.drawer-panel--contact {
    background: linear-gradient(180deg, #ffffff 0%, #f7f7f5 100%);
}

.drawer-content--contact {
    padding-top: 5rem;
    gap: 1.5rem;
}

.contact-brand-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.contact-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #666;
}

.contact-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #111;
    margin-top: 30px;
}

.contact-panel-section {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: 1.2rem;
    padding: 1.25rem 1rem;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.03);
}

.contact-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.9rem;
}

.contact-section-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #696969;
}

.contact-section-head h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.03em;
}

.contact-text {
    font-size: 0.96rem;
    color: #575757;
    line-height: 1.8;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.btn-contact {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    background: #f5f5f3;
    border: 1px solid rgba(17, 17, 17, 0.06);
    border-radius: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    font-weight: 500;
}

.btn-contact:hover {
    background: #fff;
    border-color: rgba(17, 17, 17, 0.12);
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.06);
    transform: translateY(-2px);
}

.contact-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(17, 17, 17, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.contact-icon-image {
    width: 15rem;
    height: 15rem;
    object-fit: contain;
}

.contact-icon--phone {
    font-size: 1.2rem;
    background: #f4f4f4;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-meta strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
}

.contact-meta small {
    font-size: 0.72rem;
    color: #696969;
}

.drawer-close--contact {
    top: 1.4rem;
    left: 1.2rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(17, 17, 17, 0.06);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .header-container {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 2.5rem;
    }

    .category-nav-container {
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .category-btn {
        font-size: 0.9rem;
        padding: 0.75rem 0;
    }

    .main {
        padding: 2rem 1.5rem;
    }

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

    .product-image {
        height: 250px;
    }

    .drawer-panel {
        max-width: 100%;
    }

    .drawer-content {
        padding: 4rem 1.5rem 2rem;
    }

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

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

    .product-price-current {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        font-size: 2.2rem;
    }

    .btn-contact-header {
        width: 100%;
    }

    .category-nav-container {
        padding: 0 1rem;
        gap: 0.75rem;
        overflow-x: auto;
    }

    .category-btn {
        font-size: 0.85rem;
    }

    .main {
        padding: 1.5rem 1rem;
    }

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

    .product-image {
        height: 200px;
    }

    .drawer-content {
        padding: 3rem 1rem 1rem;
    }

    .drawer-close {
        top: 1rem;
        right: 1rem;
    }

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

    .product-thumbnails {
        gap: 0.5rem;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .contact-buttons {
        gap: 0.75rem;
    }

    .btn-contact {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}
