/* ==========================================================================
   KERIN Product Showcase - Switcher Layout (BULLETPROOF)
   ========================================================================== */

.kerin-product-switcher-wrapper {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    display: block !important;
}

/* 🚨 STRICT HIDE/SHOW LOGIC - PREVENTS STACKING 🚨 */
.kerin-product-switcher-wrapper .kerin-switcher-item {
    display: none !important;
}

.kerin-product-switcher-wrapper .kerin-switcher-item.is-active {
    display: block !important;
    animation: kerinFadeIn 0.3s ease-in-out;
}

@keyframes kerinFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 1. Hero Image Section */
.kerin-hero-gallery {
    width: 100%;
    background-color: #0d0d0d;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #222;
    padding: 15px;
    text-align: center;
    display: block !important;
}

.kerin-hero-gallery .kerin-hero-img {
    width: 100%;
}

.kerin-hero-gallery img {
    width: 100%;
    height: auto !important; 
    max-height: 480px !important; 
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 2. Thumbnails Grid */
.kerin-thumbs-grid {
    display: grid !important;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.kerin-thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    background-color: #0d0d0d;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.kerin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 5px;
}

.kerin-thumb:hover {
    opacity: 0.85;
}

.kerin-thumb.is-active {
    border-color: #d4af37 !important;
}

/* 3. Product Details */
.kerin-details-container {
    width: 100%;
    text-align: left;
    display: block !important;
}

.kerin-product-title {
    font-size: 1.5rem !important; /* Smaller, cleaner size */
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
    color: #f9f9f9 !important; /* Brightened for dark backgrounds */
    font-family: serif;
}

.kerin-product-price {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #d4af37 !important;
    margin-bottom: 25px !important;
}

.kerin-product-price del {
    color: #888 !important;
    font-size: 1.1rem !important;
    margin-right: 10px !important;
    font-weight: 400 !important;
}

/* Form & Cart Styling */
.kerin-add-to-cart-wrapper form.cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.kerin-add-to-cart-wrapper table.variations {
    width: 100% !important;
    margin-bottom: 15px !important;
}

.kerin-add-to-cart-wrapper table.variations td.label {
    color: #f9f9f9 !important; /* Brightened for dark backgrounds */
    font-weight: 600;
    padding-right: 15px;
    vertical-align: middle;
}

.kerin-add-to-cart-wrapper table.variations select {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.kerin-add-to-cart-wrapper .single_variation_wrap {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

.kerin-add-to-cart-wrapper div.quantity input.qty {
    width: 60px !important;
    height: 45px !important;
    text-align: center !important;
    border: 1px solid #333 !important;
    background: #111 !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 1.1rem !important;
}

.kerin-add-to-cart-wrapper button.single_add_to_cart_button {
    background-color: #111 !important;
    color: #d4af37 !important;
    padding: 12px 30px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border: 1px solid #d4af37 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
}

.kerin-add-to-cart-wrapper button.single_add_to_cart_button:hover {
    background-color: #d4af37 !important;
    color: #111 !important;
}