/* ═══════════════════════════════════════════════
   product.css — Məhsul detalı səhifəsi (product/index.php)
═══════════════════════════════════════════════ */

/* ─── PRODUCT MAIN ────────────────────────────────────────────── */
.product-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 72px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

/* ─── GALLERY ─────────────────────────────────────────────────── */
.gallery {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--warm);
    aspect-ratio: 4/5;
    cursor: zoom-in;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}
.gallery-main img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}

.gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--espresso);
    color: var(--cream);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 1px;
    z-index: 2;
}
.gallery-badge.sale {
    background: #b04040;
}

.oos-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f0eb;
    border: 1px solid #ddd8d0;
    border-radius: 4px;
    padding: 11px 16px;
    font-size: 13px;
    color: #6b5f52;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}
.oos-notice svg {
    flex-shrink: 0;
    color: #9a7f6a;
}
.btn-cart--oos {
    background: #c2bab2 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    color: #fff !important;
}

.gallery-nav {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.gallery-nav-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--espresso);
    transition: background 0.2s;
}
.gallery-nav-btn:hover {
    background: #fff;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: var(--warm);
}
.gallery-thumb.active {
    border-color: var(--espresso);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── PRODUCT INFO ────────────────────────────────────────────── */
.product-info {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.product-line {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 12px;
}
.product-name {
    font-family: var(--serif);
    font-size: clamp(26px, 2.8vw, 38px);
    font-weight: 400;
    line-height: 1.15;
    color: var(--espresso);
    margin-bottom: 14px;
}
.product-short-desc {
    font-size: 14px;
    color: var(--bark);
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 24px;
}
.product-divider {
    height: 1px;
    background: var(--warm);
    margin-bottom: 24px;
}

/* ─── SIZE SELECTOR ───────────────────────────────────────────── */
.size-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bark);
    font-weight: 500;
    margin-bottom: 12px;
}
.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.size-btn {
    font-size: 12px;
    font-family: var(--sans);
    letter-spacing: 0.06em;
    border: 1px solid var(--sand);
    background: transparent;
    color: var(--stone);
    padding: 8px 18px;
    border-radius: 2px;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s;
}
.size-btn.active {
    background: var(--espresso);
    color: var(--cream);
    border-color: var(--espresso);
}
.size-btn:hover:not(.active) {
    border-color: var(--espresso);
    color: var(--espresso);
}

/* ─── PRICE ───────────────────────────────────────────────────── */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
}
.price-current {
    font-size: 26px;
    font-family: var(--serif);
    font-weight: 500;
    color: var(--espresso);
}
.price-old {
    font-size: 16px;
    font-family: var(--serif);
    color: var(--stone);
    text-decoration: line-through;
}
.price-currency {
    font-size: 14px;
    font-weight: 400;
}

/* ─── QUANTITY ────────────────────────────────────────────────── */
.qty-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--sand);
    border-radius: 2px;
    width: fit-content;
}
.qty-btn {
    width: 40px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--bark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    user-select: none;
}
.qty-btn:hover {
    color: var(--espresso);
}
.qty-input {
    width: 48px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--sand);
    border-right: 1px solid var(--sand);
    text-align: center;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--espresso);
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ─── ACTIONS ─────────────────────────────────────────────────── */
.actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.btn-cart {
    flex: 1;
    background: var(--espresso);
    color: var(--cream);
    border: none;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 16px 24px;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-weight: 500;
}
.btn-cart:hover {
    opacity: 0.8;
}
.btn-wish {
    width: 52px;
    height: 52px;
    border: 1px solid var(--sand);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bark);
    transition:
        border-color 0.2s,
        color 0.2s;
    flex-shrink: 0;
}
.btn-wish:hover {
    border-color: var(--espresso);
    color: var(--espresso);
}
.btn-wish.active svg {
    fill: #b04040;
    stroke: #b04040;
}
.btn-wish.active {
    border-color: #b04040;
    color: #b04040;
}

/* ─── DELIVERY INFO ───────────────────────────────────────────── */
.delivery-info {
    background: var(--warm);
    border-radius: 3px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.delivery-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--bark);
}
.delivery-info-item svg {
    color: var(--espresso);
    flex-shrink: 0;
}

/* ─── TABS ────────────────────────────────────────────────────── */
.tabs-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 72px;
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--sand);
    margin-bottom: 36px;
}
.tab-btn {
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stone);
    padding: 14px 0;
    margin-right: 36px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition:
        color 0.2s,
        border-color 0.2s;
}
.tab-btn.active {
    color: var(--espresso);
    border-bottom-color: var(--espresso);
    font-weight: 500;
}
.tab-btn:hover:not(.active) {
    color: var(--bark);
}
.tab-content {
    display: none;
    font-size: 14px;
    color: var(--bark);
    line-height: 1.9;
    font-weight: 300;
    max-width: 740px;
}
.tab-content.active {
    display: block;
}
.tab-content p {
    margin-bottom: 14px;
}
.tab-content ul {
    padding-left: 18px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tab-content ul li {
    list-style: disc;
}
.tab-content p:last-child {
    margin-bottom: 0;
}
.ingredients-text {
    font-size: 12px;
    color: var(--stone);
    line-height: 2;
    letter-spacing: 0.02em;
}

/* ─── RELATED PRODUCTS ────────────────────────────────────────── */
.related-section {
    background: var(--warm);
    padding: 72px 0;
    overflow: hidden;
}
.related-inner {
    max-width: 1224px;
    margin: 0 auto;
    padding: 0 40px;
}
.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}
.related-title {
    font-family: var(--serif);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 400;
    color: var(--espresso);
}
.related-title em {
    font-style: italic;
}

/* Scroll buttons */
.related-scroll-btns {
    display: flex;
    gap: 8px;
}
.related-scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--sand);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--espresso);
    transition:
        background 0.2s,
        border-color 0.2s;
    flex-shrink: 0;
}
.related-scroll-btn:hover {
    background: var(--espresso);
    color: var(--white);
    border-color: var(--espresso);
}
.related-scroll-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.related-scroll-btn:disabled:hover {
    background: var(--white);
    color: var(--espresso);
    border-color: var(--sand);
}

/* Horizontal scroll track */
.related-track-wrap {
    position: relative;
    overflow: hidden;
}
.related-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    padding-bottom: 4px; /* extra breath */
}
.related-grid::-webkit-scrollbar {
    display: none;
}
.related-grid .product-card {
    flex: 0 0 220px; /* sabit kart eni */
    width: 220px;
}

/* Related product cards */
.product-card {
    cursor: pointer;
}
.product-img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 3/4;
    border-radius: 3px;
    margin-bottom: 16px;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--espresso);
    color: var(--cream);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 1px;
}
.product-badge.sale {
    background: #b04040;
}
.product-card-name {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
    color: var(--espresso);
    margin-bottom: 4px;
    line-height: 1.3;
}
.product-card-line {
    font-size: 11px;
    color: var(--stone);
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.product-card-price {
    font-size: 13px;
    color: var(--bark);
    font-weight: 500;
}
.product-card-price s {
    color: var(--sand);
    font-weight: 300;
    margin-right: 4px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 24px 60px;
    }
    .gallery {
        position: static;
    }
    .tabs-section {
        padding: 0 24px 60px;
    }
    .related-inner {
        padding: 0 24px;
    }
    .related-grid .product-card {
        flex: 0 0 180px;
        width: 180px;
    }
}
@media (max-width: 640px) {
    .product-main {
        padding: 0 16px 40px;
        gap: 28px;
    }
    .tabs-section {
        padding: 0 16px 40px;
    }
    .related-inner {
        padding: 0 16px;
    }
    .related-grid .product-card {
        flex: 0 0 150px;
        width: 150px;
    }
    .product-actions { flex-direction: column; gap: 10px; }
    .btn-add-cart, .btn-buy { width: 100%; justify-content: center; }
    .gallery-thumbs { gap: 8px; }
    .gallery-thumb { width: 56px; height: 56px; }
}
