
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #faf9f6;
    color: #28291f;
    font-family: "DM Sans", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Product Detail Layout */
.detail-container {
    max-width: 1200px;
    width: 90%;
    margin: 35px auto 70px;
}

.breadcrumb {
    color: #77776e;
    font-size: 13px;
    margin-bottom: 35px;
}

.breadcrumb a:hover {
    color: #78804c;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 65px;
    align-items: start;
}

/* Product Image and Zoom */
.detail-image {
    overflow: hidden;
    background: #f0eee6;
}

.detail-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: zoom-in;
}

.zoom-hint {
    margin: 0;
    padding: 12px;
    color: #77776e;
    font-size: 12px;
    text-align: center;
}

/* Product Information */
.detail-info {
    padding-top: 20px;
}

.detail-category,
.eyebrow {
    color: #78804c;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.detail-info h1,
.similar-section h2 {
    font-family: "Playfair Display", serif;
    font-weight: 500;
}

.detail-info h1 {
    font-size: clamp(30px, 4vw, 46px);
    margin: 18px 0;
}

.detail-price {
    font-size: 24px;
    font-weight: 600;
}

.detail-description {
    color: #68685f;
    line-height: 1.9;
    margin: 25px 0;
}

.stock-status {
    font-size: 14px;
}

.in-stock {
    color: #477345;
}

.out-of-stock {
    color: #b33d32;
}

/* Quantity Selector */
.quantity-selector {
    margin-top: 25px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #d9d7cd;
}

.quantity-controls button {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.quantity-controls input {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font: inherit;
    background: transparent;
}

.quantity-controls button:hover {
    background: #eeede5;
}

/* Add to Cart */
.detail-cart-btn {
    width: 100%;
    padding: 17px;
    margin-top: 20px;
    border: none;
    background:var(--olive);
    color: white;
    font: inherit;
    cursor: pointer;
}

.detail-cart-btn:disabled {
    background: #aaa99f;
    cursor: not-allowed;
}

#detailMessage {
    font-size: 13px;
    color: #477345;
}

/* Similar Products */
.similar-section {
    margin-top: 90px;
}

.similar-section h2 {
    font-size: 32px;
    margin: 12px 0 28px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.similar-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #f0eee6;
}

.similar-card h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 14px 0 8px;
}

.similar-card p {
    font-weight: 600;
}

.similar-card:hover h3 {
    color: #78804c;
}

/* Responsive Layout */
@media (max-width: 700px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .detail-info {
        padding-top: 0;
    }

    .similar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .similar-section {
        margin-top: 55px;
    }
}

.purchase-benefits {
    margin-top: 28px;
    border-top: 1px solid #e9e6dc;
    padding-top: 8px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 10px;
    margin-bottom: 4px;
    background: #fff;
    border-radius: 10px;
}

.benefit-icon {
    flex-shrink: 0;
    color: #56613a;
    font-size: 18px;
    line-height: 1.4;
}

.benefit-item h4 {
    margin: 0 0 2px;
    color: #28291f;
    font-size: 12px;
    font-weight: 600;
}

.benefit-item p {
    margin: 0;
    color: #68685f;
    font-size: 12px;
    line-height: 1.5;
}

.purchase-actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px;
}

.purchase-actions .detail-cart-btn {
    flex: 1;
    width: auto;
    margin-top: 0;
}

.detail-wishlist-btn:hover,
.detail-wishlist-btn.selected {
    background: #737b49;
    color: #fff;
}

/* Product image carousel */
.carousel-main {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f1e9;
}

.carousel-main > #mainProductImage {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #35402b;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.prev-arrow {
    left: 12px;
}

.next-arrow {
    right: 12px;
}

.carousel-arrow:hover {
    background: #35402b;
    color: #fff;
}

.carousel-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
}

.carousel-thumbnail {
    flex: 0 0 78px;
    height: 88px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f1e9;
    cursor: pointer;
}

.carousel-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-thumbnail.active {
    border-color: #596747;
}

.carousel-thumbnail:focus-visible,
.carousel-arrow:focus-visible {
    outline: 2px solid #596747;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .carousel-main > #mainProductImage {
        height: 360px;
    }

    .carousel-arrow {
        width: 34px;
        height: 34px;
    }

    .carousel-thumbnail {
        flex-basis: 64px;
        height: 72px;
    }
}

@media (max-width: 480px) {
    .carousel-main > #mainProductImage {
        height: 300px;
    }
}

/* Purchase Buttons */
.purchase-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

.purchase-actions button {
    flex: 1;
    min-width: 0;
    padding: 15px 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Add to Cart */
.detail-cart-btn {
    background:var(--olive);
    color: #fff;
    border: 1px solid #78804d;
}

.detail-cart-btn:hover {
    background: var(--olive-dark);
    border-color: #59613b;
}

/* Buy Now */
.detail-buy-btn {
    background:var(--olive);
    color: #fff;
    border: 1px solid #78804d;
}

.detail-buy-btn:hover {
    background:var(--olive-dark);
    color: #fff;
    border-color: #59613b;
}

/* Disabled Buttons */
.purchase-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .purchase-actions {
        gap: 8px;
    }

    .purchase-actions button {
        padding: 13px 8px;
        font-size: 13px;
    }
}

