body{
    background:#f5f5f5;
    margin:0;
    font-family:Arial,sans-serif;
}

.product-container{
    max-width:1200px;
    margin:auto;
}

.product-gallery{
    background:#fff;
    text-align:center;
}

.main-image{
    width:100%;
    max-width:500px;
    padding:20px;
}

.product-info{
    background:#fff;
    padding:20px;
    margin-top:10px;
}

.product-info h1{
    margin:0;
    font-size:28px;
}

.price{
    color:#ee4d2d;
    font-size:36px;
    font-weight:bold;
    margin-top:10px;
}

.sold{
    margin-top:10px;
    color:#666;
}

.product-details{
    background:#fff;
    padding:20px;
    margin-top:10px;
}

.thumbnail-row{
    display:flex;
    justify-content:center;
    gap:10px;
    padding:10px 15px 20px;
    background:#fff;
}

.thumbnail-row img{
    width:80px;
    height:80px;
    object-fit:cover;
    border:1px solid #ddd;
    border-radius:8px;
    cursor:pointer;
}

.thumbnail-row img:hover{
    border:2px solid #ee4d2d;
}



.cart-btn{
    width:50%;
    background:#ffffff;
    border:1px solid #ddd;
    color:#7a3b12;
    font-size:16px;
    font-weight:bold;
}

.buy-btn{
    width:50%;
    background:#7a3b12;
    border:none;
    color:#ffffff;
    font-size:16px;
    font-weight:bold;
}

.product-details p{
    margin-bottom:12px;
    line-height:1.6;
}

.related-products{
    background:#fff;
    margin-top:10px;
    padding:20px;
}

.related-products h2{
    margin-bottom:15px;
    font-size:22px;
}

.related-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:15px;
    align-items:stretch;
}

.related-card{
    background:#fff;
    border:1px solid #eee;
    border-radius:10px;
    padding:12px;
    text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
    display:flex;
    flex-direction:column;
    min-width:0;
    min-height:300px;
}

.related-card img{
    width:100%;
    height:150px;
    object-fit:contain;
    display:block;
    margin:0 auto 10px;
    flex:0 0 auto;
}

.related-card h3{
    font-size:16px;
    line-height:1.2;
    margin:0 0 8px;
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow-wrap:anywhere;
}

.related-card p{
    color:#ee4d2d;
    font-size:18px;
    font-weight:bold;
    margin:0 0 12px;
    min-height:24px;
}

.related-card a{
    display:block;
    background:#7a3b12;
    color:white;
    padding:10px 8px;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
    font-weight:800;
    margin-top:auto;
}

@media(max-width:768px){
    .related-grid{
        grid-template-columns:repeat(2, 1fr);
    }
}


body{
    background:#f3eee8;
}

.stock-text{
    margin-top:8px;
    color:#5b2d0c;
    font-size:14px;
    font-weight:bold;
}

/* ==========================================
   Sticky CTA Fix
========================================== */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    width: 100%;
    z-index: 9999;
}

.sticky-cta form{
    flex:1;
    display:flex;
}

.sticky-cta form button{
    flex:1;
}

.sticky-cta button {
    width: 100%;
    height: 55px;
    border: none;
    font-size: 16px;
    font-weight: bold;
}

.cart-btn {
    background: #fff;
    color: #8b4513;
}

.buy-btn {
    background: #8b4513;
    color: #fff;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    width: 100vw;
    height: 58px;
    z-index: 999999;
    background: #fff8ef;
    border-top: 1px solid #eadfd4;
    box-shadow: 0 -5px 18px rgba(43,18,7,0.12);
}

.bottom-form {
    width: 50%;
    height: 58px;
    margin: 0;
    padding: 0;
}

.bottom-form button {
    width: 100%;
    height: 58px;
    display: block;
    border: none;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.bottom-cart {
    background: #fff8ef;
    color: #7a3e12;
    border-right: 1px solid #eadfd4 !important;
}

.bottom-buy {
    background: #c1121f;
    color: #ffffff;
}

.bottom-cart:hover {
    background: #fff1e2;
}

.bottom-buy:hover {
    background: #9f0f19;
}

/* Product page responsive gallery fix */
.product-container {
    max-width: 1180px !important;
    margin: 24px auto !important;
    padding: 0 16px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 520px) minmax(320px, 1fr) !important;
    gap: 22px !important;
    align-items: start !important;
}

.product-gallery,
.product-info {
    border-radius: 14px !important;
    box-shadow: 0 3px 14px rgba(0,0,0,.06) !important;
    overflow: hidden !important;
}

.product-gallery {
    padding: 16px !important;
}

.main-image {
    display: block !important;
    width: 100% !important;
    max-width: 480px !important;
    height: 480px !important;
    max-height: 70vh !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #fff !important;
}

.thumbnail-row {
    flex-wrap: wrap !important;
    padding: 14px 0 0 !important;
    gap: 8px !important;
}

.thumbnail-row img {
    width: 68px !important;
    height: 68px !important;
    object-fit: cover !important;
    flex: 0 0 auto !important;
}

.product-info {
    margin-top: 0 !important;
    min-width: 0 !important;
}

.product-details,
.product-reviews,
.related-products {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 14px !important;
}

@media (max-width: 900px) {
    .product-container {
        grid-template-columns: 1fr !important;
        margin: 16px auto !important;
        gap: 14px !important;
    }

    .main-image {
        height: min(72vw, 420px) !important;
        max-width: 100% !important;
    }
}

@media (max-width: 600px) {
    .product-container {
        padding: 0 10px !important;
        margin: 10px auto 16px !important;
    }

    .product-gallery {
        padding: 10px !important;
        border-radius: 10px !important;
    }

    .main-image {
        height: 78vw !important;
        max-height: 360px !important;
    }

    .thumbnail-row {
        justify-content: flex-start !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 4px !important;
    }

    .thumbnail-row img {
        width: 58px !important;
        height: 58px !important;
    }

    .product-info {
        padding: 16px !important;
        border-radius: 10px !important;
    }

    .product-info h1 {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }

    .price {
        font-size: 28px !important;
    }

    .product-details,
    .product-reviews,
    .related-products {
        margin: 12px 10px !important;
        padding: 16px !important;
        border-radius: 10px !important;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .related-card {
        min-height: 285px !important;
        padding: 10px !important;
    }

    .related-card img {
        height: 120px !important;
    }

    .related-card h3 {
        font-size: 13px !important;
        min-height: 50px !important;
    }

    .related-card p {
        font-size: 16px !important;
    }
}
