/* ============================================================
   COWAY PRODUCT CATEGORY LAYOUT - FIGMA SPEC EXACT (DYNAMIC)
   ============================================================ */

/* Global Category Container */
.category-page-wrap {
    background-color: #F8FAFC;
    color: #333333;
    min-height: 100vh;
    overflow-x: clip;
    width: 100%;
}

/* ------------------------------------------------------------
   1. HERO SECTION (FIGMA SPEC EXACT - DYNAMIC LARGE PRODUCT HERO)
   ------------------------------------------------------------ */
.category-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 560px;
    border-radius: 0px 0px 0px 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.category-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 0;
    align-items: center;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 0 0 80px;
    width: 100%;
    box-sizing: border-box;
}

.category-hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 580px;
    padding: 60px 40px 60px 0;
    box-sizing: border-box;
}

.category-hero-badge {
    font-family: 'Stack Sans Headline', 'Inter', sans-serif;
    font-size: 18px;
    line-height: 23px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.category-hero-line {
    width: 150px;
    height: 0px;
    border-top: 3px solid #00A7E1;
    margin-bottom: 24px;
}

.category-hero-title {
    font-family: 'Stack Sans Headline', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 62px;
    color: #FFFFFF;
    margin: 0 0 28px 0;
}

.category-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: #00A7E1;
    border-radius: 12px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-hero-btn:hover {
    background: #008cc0;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 167, 225, 0.5);
    color: #FFFFFF;
}

.category-hero-right {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    padding-top: 60px;
    box-sizing: border-box;
    overflow: hidden;
}

.category-hero-img {
    max-width: 100%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s ease;
}

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

/* ------------------------------------------------------------
   2. CATEGORY PRODUCTS SECTION (FIGMA SPEC EXACT)
   ------------------------------------------------------------ */
.category-products-section {
    padding: 90px 0;
    position: relative;
}

.category-products-section.alt-bg {
    background: rgba(242, 251, 255, 0.6);
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.category-section-header {
    text-align: center;
    margin-bottom: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-section-title {
    font-family: 'Stack Sans Headline', 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 32px;
    line-height: 42px;
    text-align: center;
    color: #333333;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.category-section-line {
    width: 150px;
    height: 0px;
    border-top: 3px solid #00A7E1;
    margin: 0 auto;
}

/* Products Grid Container */
.products-grid-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
}

/* Individual Product Card (Figma Exact - 1 Outer Card Wrapper) */
.product-card-item {
    width: 277px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 24px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.category-products-section.alt-bg .product-card-item {
    background: #FFFFFF;
}

.product-card-item:hover {
    transform: translateY(-8px);
    border-color: #00A7E1;
    box-shadow: 0 20px 40px rgba(0, 167, 225, 0.16);
}

.product-card-thumb {
    width: 100%;
    height: 240px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.product-card-img {
    max-width: 100%;
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-item:hover .product-card-img {
    transform: scale(1.06) translateY(-4px);
}

.product-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    margin-top: 16px;
    width: 100%;
}

.product-card-code {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card-name {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 26px;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.product-card-item:hover .product-card-name {
    color: #00A7E1;
}

/* ------------------------------------------------------------
   3. SPECIFICATIONS MODAL (FIGMA SPEC DYNAMIC)
   ------------------------------------------------------------ */
.spec-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.spec-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.spec-modal-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 1100px;
    max-width: 95vw;
    max-height: 90vh;
    background: #FFFFFF;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.spec-modal-backdrop.active .spec-modal-container {
    transform: scale(1);
}

.spec-modal-left {
    flex: 1;
    width: 55%;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.spec-modal-heading {
    font-family: 'Stack Sans Headline', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 32px;
    color: #0F172A;
    margin: 0;
}

.spec-modal-product-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #00A7E1;
    text-transform: uppercase;
    margin: 0;
}

.spec-modal-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.spec-row {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    border-bottom: 1px dashed #E2E8F0;
}

.spec-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.spec-value {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1E293B;
    line-height: 1.5;
}

.spec-modal-note {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #94A3B8;
    font-style: italic;
    margin-top: auto;
    padding-top: 16px;
}

.spec-modal-right {
    flex: 1;
    width: 45%;
    background: #F8FAFC;
    border-left: 1px solid #E2E8F0;
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.spec-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.spec-modal-close-btn:hover {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #94A3B8;
}

.spec-blueprint-img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.12));
}

.spec-modal-cta {
    margin-top: 24px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ------------------------------------------------------------
   4. FULL RESPONSIVE TIERS (DESKTOP, MACBOOK, TABLET, MOBILE)
   ------------------------------------------------------------ */

/* Tier 1: Laptop & Macbook (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
    .category-hero-section {
        height: 100vh;
        height: 100dvh;
        min-height: 540px;
    }
    .category-hero-inner {
        padding-left: 40px;
        grid-template-columns: 50% 50%;
    }
    .category-hero-title {
        font-size: 40px;
        line-height: 52px;
    }
}

/* Tier 2: Tablet & iPad (768px - 1023.9px) -> Bersebelahan 2 Kolom */
@media (max-width: 1023.9px) and (min-width: 768px) {
    .category-hero-section {
        height: 100vh;
        height: 100dvh;
        min-height: 500px;
        padding: 0;
        border-radius: 0px 0px 0px 60px;
    }

    .category-hero-inner {
        display: grid;
        grid-template-columns: 50% 50%;
        gap: 0;
        align-items: center;
        max-width: 100%;
        height: 100%;
        margin: 0 auto;
        padding: 0 0 0 32px;
        box-sizing: border-box;
    }

    .category-hero-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 40px 16px 40px 0;
        max-width: 100%;
    }

    .category-hero-line {
        margin: 0 0 20px 0;
    }

    .category-hero-title {
        font-size: 32px;
        line-height: 44px;
        margin-bottom: 24px;
    }

    .category-hero-btn {
        margin: 0;
    }

    .category-hero-right {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: flex-end;
        justify-content: center;
        padding-top: 40px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .category-hero-img {
        max-width: 100%;
        max-height: 90%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: bottom center;
        display: block;
        margin: 0 auto;
        filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.25));
    }
}

/* Tier 3: Mobile Devices (<= 767.9px) */
@media (max-width: 767.9px) {
    .category-hero-section {
        height: auto;
        min-height: 480px;
        padding: 120px 0 50px 0;
        border-radius: 0px 0px 0px 40px;
        display: flex;
        align-items: center;
        background-image: var(--hero-bg-mobile, var(--hero-bg-desktop));
        background-size: cover !important;
        background-position: 75% center !important;
        background-repeat: no-repeat !important;
        box-sizing: border-box;
    }

    .category-hero-inner {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        max-width: 100%;
        width: 100%;
        padding: 0 24px;
        box-sizing: border-box;
    }

    .category-hero-left {
        align-items: flex-start;
        text-align: left;
        padding: 0;
        max-width: 250px;
        width: 100%;
    }

    .category-hero-badge {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 8px;
        text-align: left;
    }

    .category-hero-line {
        width: 80px;
        margin: 0 0 16px 0;
    }

    .category-hero-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 22px;
        text-align: left;
        color: #FFFFFF;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .category-hero-btn {
        padding: 10px 26px;
        font-size: 15px;
        margin: 0;
    }

    .category-hero-right {
        display: none !important;
    }

    .products-grid-container {
        gap: 20px;
        padding: 0 16px;
    }

    .product-card-item {
        width: 100%;
        max-width: 290px;
    }
}

/* Tier 4: Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
    .category-hero-section {
        min-height: 440px;
        padding: 110px 0 44px 0;
        background-position: 80% center !important;
    }

    .category-hero-inner {
        padding: 0 20px;
    }

    .category-hero-left {
        max-width: 220px;
    }

    .category-hero-title {
        font-size: 22px;
        line-height: 30px;
    }

    .category-hero-right {
        display: none !important;
    }
}
