/* ============================
   PRODUCTS SECTION
============================ */

.products-section {
    padding: 96px 24px;
    background: #ffffff;
}

@media (min-width: 1280px) {
    .products-section {
        padding-left: 64px;
        padding-right: 64px;
    }
}

/* ============================
   HEADER
============================ */

.products-header {
    text-align: center;
    margin-bottom: 56px;
}

.products-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #233d7c;
    margin-bottom: 12px;
}

.products-header p {
    font-size: 1.1rem;
    color: #5a6d8f;
    max-width: 520px;
    margin: 0 auto;
}

/* ============================
   FILTERS
============================ */

.products-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #f4ede5;
    color: #5a6d8f;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #d5ead6;
    color: #233d7c;
}

.filter-btn.active {
    background: #233d7c;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(35, 61, 124, 0.25);
    transform: scale(1.06);
}

/* ============================
   GRID
============================ */

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px 28px;
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ============================
   PRODUCT CARD
============================ */

.product-card {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease;
}

.product-card:hover {
    transform: translateY(-14px);
    box-shadow:
        0 28px 60px rgba(17, 24, 39, 0.18),
        0 10px 24px rgba(17, 24, 39, 0.08);
}

.product-card.is-hidden {
    display: none;
}

/* ============================
   IMAGE
============================ */

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.12);
}

/* ============================
   BADGE
============================ */

.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background: #233d7c;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.product-badge[data-status="new"] {
    background: #d5ead6;
    color: #233d7c;
}

.product-badge[data-status="out"] {
    background: #c0392b;
}

/* ============================
   INFO
============================ */

.product-info {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.05rem;
    color: #233d7c;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-info p {
    font-size: 0.92rem;
    color: #5a6d8f;
    line-height: 1.55;
    margin-bottom: 18px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================
   CTA
============================ */

.product-more {
    margin-top: auto;
    width: 100%;
    background: #233d7c;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-more:hover {
    background: #1a2d5f;
    transform: translateY(-2px);
}

/* ============================
   MODAL
   ============================ */

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.product-modal:not(.is-hidden) {
    opacity: 1;
    pointer-events: auto;
}

.product-modal.is-hidden {
    display: none;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.product-modal-content {
    position: relative;
    z-index: 10;
    background: #ffffff;
    width: 100%;
    max-width: 1024px;
    max-height: 90vh;
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Header (Close Button) */
.product-modal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.product-modal-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: #233d7c;
    transition: background 0.2s ease;
}

.product-modal-close:hover {
    background: #f4ede5;
}

/* Body */
.product-modal-body {
    padding: 24px;
}

@media (min-width: 768px) {
    .product-modal-body {
        padding: 32px 48px 48px;
    }
}

/* Grid Layout */
.pm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .pm-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}

/* Gallery Column */
.pm-gallery-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pm-main-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: #f4f4f4;
}

.pm-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #233d7c;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-nav-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.pm-nav-btn.prev {
    left: 12px;
}

.pm-nav-btn.next {
    right: 12px;
}

.pm-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pm-thumbnails img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.pm-thumbnails img:hover {
    opacity: 1;
}

.pm-thumbnails img.active {
    border-color: #233d7c;
    opacity: 1;
}

/* Info Column */
.pm-info-col {
    display: flex;
    flex-direction: column;
}

.pm-title {
    font-size: 2rem;
    font-weight: 600;
    color: #233d7c;
    margin-bottom: 24px;
    line-height: 1.2;
}

.pm-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.pm-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.pm-label {
    font-size: 0.95rem;
    color: #5a6d8f;
}

.pm-value {
    font-size: 1rem;
    font-weight: 500;
    color: #233d7c;
}

/* Status Colors in Modal */
.modal-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-status.new {
    background: #d5ead6;
    color: #233d7c;
}

.modal-status.stock {
    background: #233d7c;
    color: #ffffff;
}

.modal-status.outlet {
    background: #a77d5c;
    color: #ffffff;
}

.pm-description {
    font-size: 1rem;
    color: #5a6d8f;
    line-height: 1.6;
    margin-bottom: 32px;
}

.pm-whatsapp-btn {
    margin-top: auto;
    width: 100%;
    background: #25d366;
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.pm-whatsapp-btn:hover {
    background: #1ebc51;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}