/*
Theme Name: DB Serang Astra
Theme URI: https://duniabesiserang.com
Description: Custom Child Theme untuk Dunia Besi Serang
Author: Administrator
Template: astra
Version: 1.0.0
Text Domain: dbserang-astra
*/

/* =========================================
   STYLE UNTUK SINGLE PRODUK (CUSTOM POST TYPE)
   ========================================= */

/* Hero Banner */
.produk-hero {
    position: relative;
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}
.produk-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.produk-hero-title {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
    font-size: 42px;
    font-weight: bold;
    margin: 0;
    text-align: center;
    padding: 0 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid Varian (Otomatis Center jika kurang dari 4) */
.grid-varian {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}
.item-varian {
    flex: 1 1 calc(25% - 12px);
    max-width: calc(25% - 12px);
    box-sizing: border-box;
}
.item-varian img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Grid Tabel (Otomatis Center & Menyesuaikan Jumlah Kolom) */
.grid-tabel-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    align-items: flex-start;
}
.tabel-column {
    flex: 1 1 calc(25% - 12px);
    max-width: calc(25% - 12px);
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.item-tabel img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Aturan Khusus Jika Hanya Ada 1 Kolom/Tabel (Agar Tidak Terlalu Melebar) */
.grid-tabel-container:has(.tabel-column:only-child) {
    justify-content: center;
}
.grid-tabel-container .tabel-column:only-child {
    flex: 0 0 70%;
    max-width: 70%;
}

/* Responsivitas (HP & Tablet) */
@media (max-width: 1024px) { 
    .item-varian, .tabel-column { flex: 1 1 calc(33.333% - 10px); max-width: calc(33.333% - 10px); }
    .grid-tabel-container .tabel-column:only-child { flex: 0 0 85%; max-width: 85%; }
}
@media (max-width: 768px) { 
    .item-varian, .tabel-column { flex: 1 1 calc(50% - 7.5px); max-width: calc(50% - 7.5px); }
    .grid-tabel-container .tabel-column:only-child { flex: 0 0 100%; max-width: 100%; }
    .produk-hero { height: 250px; }
    .produk-hero-title { font-size: 32px; }
}
@media (max-width: 480px) { 
    .item-varian, .tabel-column { flex: 1 1 100%; max-width: 100%; }
}

/* =========================================
   TOMBOL WHATSAPP CTA
   ========================================= */
.wa-cta-container {
    text-align: center;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
}
.wa-cta-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
}
.btn-whatsapp svg {
    margin-right: 10px;
    width: 24px;
    height: 24px;
    fill: currentColor;
}