/* ===== Product Gallery ===== */
.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.product-gallery .main-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: .5rem;
    overflow: hidden;
    min-height: 360px;
}
.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 520px;
    display: block;
    cursor: zoom-in;
}

/* Thumbnails */
.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
}
.thumbnail {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    flex: 0 0 auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
}
.thumbnail.active { border-color: #0d6efd; box-shadow: 0 2px 6px rgba(13,110,253,0.12); }

/* ===== Product Options ===== */
.product-options { margin-top: 18px; }
.color-options, .size-options { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

.color-option {
    width:34px; height:34px; border-radius:6px; cursor:pointer; border:2px solid #eee; box-shadow:0 1px 2px rgba(0,0,0,0.03);
    display:flex; align-items:center; justify-content:center; font-size:0.75rem; text-align:center;
}
.color-option.active { outline: 3px solid rgba(13,110,253,0.15); border-color: #0d6efd; background:#0d6efd; color:#fff; }

.size-option {
    padding: 8px 12px; border-radius:6px; cursor:pointer; border:1px solid #e6e6e6; background:#fff; transition: all 0.2s;
}
.size-option:hover { border-color:#0d6efd; }
.size-option.active { background:#0d6efd; color:#fff; border-color:#0d6efd; }

/* ===== Quantity Selector ===== */
.quantity-selector { display:flex; align-items:center; gap:8px; max-width:160px; margin-top:4px; }
.quantity-btn {
    width:34px; height:34px; border-radius:6px; border:1px solid #ddd; background:#fff; display:inline-flex; 
    align-items:center; justify-content:center; cursor:pointer; font-weight:600; font-size:16px; transition: all 0.2s;
}
.quantity-btn:hover { background:#0d6efd; color:#fff; }

.quantity-input { width:70px; text-align:center; border-radius:6px; border:1px solid #ddd; padding:6px 8px; font-size:14px; }

/* ===== Action Buttons ===== */
.action-buttons { display:flex; gap:12px; margin-top:16px; align-items:center; flex-wrap:wrap; }
.btn-cart { background:#0d6efd; color:#fff; border:none; padding:10px 18px; border-radius:8px; cursor:pointer; transition: all 0.2s; }
.btn-cart:hover { background:#0b5ed7; }
.btn-wishlist { border:1px solid #ddd; background:#fff; padding:10px 14px; border-radius:8px; cursor:pointer; transition: all 0.2s; }
.btn-wishlist:hover { border-color:#0d6efd; color:#0d6efd; }

/* ===== Price Area ===== */
.product-price { font-size:1.5rem; font-weight:700; display:flex; align-items:center; gap:10px; margin-top:8px; }
.old-price { font-size:1rem; color:#6c757d; text-decoration:line-through; font-weight:500; }
.discount-badge { background:#dc3545; color:#fff; padding:4px 8px; border-radius:6px; font-size:.85rem; }

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .product-gallery .main-image { min-height: 260px; }
    .thumbnail { width:56px; height:56px; }
}

.btn-buy-now {
    background: linear-gradient(45deg, #ff6b35, #ff8e35);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-buy-now:hover:not(:disabled) {
    background: linear-gradient(45deg, #e55a2e, #e57e2e);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-buy-now:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 576px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-cart, .btn-buy-now {
        width: 100%;
        text-align: center;
    }
}

.order-summary span:first-child {
    font-weight: 500;
    color: #555;
}

.order-summary span:last-child {
    font-weight: 600;
    color: #333;
}

.order-summary .fw-bold.fs-5 {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}


.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease; /* smooth zoom */
    transform-origin: center center;
    touch-action: none; /* allow touch gestures */
}

.zoom-container.active .zoom-image {
    transform: scale(3); /* zoom level */
    cursor: zoom-out;
}

.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-text {
    margin-bottom: 2px;
}
