/* Variables */
:root {
    --primary-color: #4e73df;
    --primary-hover: #2e59d9;
    --accent-color: #1cc88a;
    --discount-bg: #ff4757;
    --text-main: #2d3436;
    --text-muted: #858796;
    --bg-light: #f8f9fc;
    --border-color: #eaecf4;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Hind Siliguri', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb i {
    font-size: 0.75rem;
}

.breadcrumb span {
    color: var(--text-main);
    font-weight: 500;
}

/* Main Layout Grid */
.product-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    background-color: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

/* LEFT: Gallery Styles */
.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    width: 100%;
    height: 450px;
    background-color: #fafafa;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.main-image-container img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.discount-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--discount-bg), #ff6b81);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

/* Thumbnail Row */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.thumb-box {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1.5px solid var(--border-color);
}

.thumb-box img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.thumb-box.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.15);
    background-color: var(--white);
}

.thumb-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* RIGHT: Product Info Styles */
.info-section {
    display: flex;
    flex-direction: column;
}

.category-tag {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 5px 0 15px 0;
    color: var(--text-main);
    line-height: 1.3;
}

.meta-row {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.stock-badge {
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-badge.in-stock {
    background-color: rgba(28, 200, 138, 0.1);
    color: var(--accent-color);
}

.stock-badge.out-of-stock {
    background-color: rgba(255, 71, 87, 0.1);
    color: var(--discount-bg);
}

/* Star Ratings */
.rating-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.stars {
    color: #f6c23e;
    font-size: 0.95rem;
}

.rating-val {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Prices */
.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.old-price {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

/* Variations: Sizes & Colors */
.option-group {
    margin-bottom: 20px;
}

.option-group label {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 10px;
}

.options-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-btn {
    border: 1.5px solid var(--border-color);
    background-color: var(--white);
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.option-btn.selected {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Actions: Qty and Buttons */
.action-container {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    height: 48px;
}

.quantity-selector button {
    background: transparent;
    border: none;
    width: 40px;
    height: 100%;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background-color: var(--bg-light);
}

.quantity-selector input {
    width: 45px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons Grid */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex-grow: 1;
}

.btn {
    height: 48px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-add-cart {
    background-color: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
}

.btn-add-cart:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-buy-now {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-buy-now:hover {
    background-color: #17a673;
    box-shadow: 0 4px 15px rgba(28, 200, 138, 0.3);
}

.btn.disabled {
    background-color: #eaecf4 !important;
    color: #a0a5b5 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Description text */
.description-container h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.description-text {
    line-height: 1.6;
    color: #4a5568;
    font-size: 0.95rem;
}

/* Responsive Styles for Mobile */
@media (max-width: 850px) {
    .product-details-wrapper {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .main-image-container {
        height: 350px;
    }
    .action-container {
        flex-direction: column;
        align-items: stretch;
    }
    .quantity-selector {
        justify-content: center;
    }
}