/* Product detail page — content section only */

.product-detail__breadcrumb {
    padding: 20px 0 0;
}

.product-detail__breadcrumb .breadcrumb {
    font-size: 0.8125rem;
    --bs-breadcrumb-divider: "›";
}

.product-detail__breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.product-detail__breadcrumb .breadcrumb-item a:hover {
    color: var(--primary);
}

.product-detail__breadcrumb .breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}

/* Gallery */
.product-gallery__main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-light);
    box-shadow: var(--shadow);
    aspect-ratio: 1 / 1;
}

.product-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-gallery__main:hover .product-gallery__main-img {
    transform: scale(1.05);
}

.product-gallery__thumbs {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}

.product-gallery__thumbs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.product-gallery__thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    opacity: 0.75;
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

/* Product info */
.product-info {
    position: relative;
}

.product-info__badge {
    display: inline-block;
    font-family: var(--font-tag, "Cormorant Garamond", Georgia, serif);
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.product-info__badge--sale {
    background: var(--primary);
    color: #fff;
}

.product-info__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0 0 12px;
}

.product-info__rating {
    margin-bottom: 8px;
}

.product-info__review-link {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-left: 4px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-info__review-link:hover {
    color: var(--primary);
}

.product-info__category {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 20px;
}

.product-info__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.product-info__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.product-info__compare {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.product-info__discount {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(185, 28, 28, 0.08);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.product-info__stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 20px;
}

.product-info__stock--in {
    color: #15803d;
}

.product-info__stock--out {
    color: #b91c1c;
}

.product-info__short {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-body);
    margin-bottom: 28px;
}

.product-info__actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
}

.product-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    flex: 1;
    max-width: 160px;
}

.product-qty__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 48px;
    padding: 0;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.product-qty__btn:hover:not(:disabled) {
    background: var(--border);
}

.product-qty__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-qty__input {
    flex: 1;
    width: 48px;
    min-width: 0;
    height: 48px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    -moz-appearance: textfield;
}

.product-qty__input::-webkit-outer-spin-button,
.product-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-info__wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1.25rem;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.product-info__wishlist:hover {
    border-color: var(--text-dark);
}

.product-info__wishlist.is-active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(185, 28, 28, 0.06);
}

.product-info__add-cart {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.product-info__add-cart:hover:not(:disabled) {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: var(--shadow-hover);
}

.product-info__add-cart:active:not(:disabled) {
    transform: scale(0.99);
}

.product-info__add-cart:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.85;
}

/* Tabs */
.product-tabs {
    border-bottom: 1px solid var(--border);
    gap: 8px;
    margin-bottom: 28px;
}

.product-tabs .nav-link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 12px 20px;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.product-tabs .nav-link:hover {
    color: var(--text-dark);
    border-color: transparent;
}

.product-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border-bottom-color: var(--primary);
}

.product-tab-panels {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-body);
}

.product-tab-panels p {
    margin-bottom: 1rem;
}

.product-tab-list {
    margin: 0;
    padding-left: 1.25rem;
}

.product-tab-list li {
    margin-bottom: 0.5rem;
}

.product-info-table {
    width: 100%;
    max-width: 520px;
    border-collapse: collapse;
}

.product-info-table th,
.product-info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.product-info-table th {
    width: 38%;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-white);
}

.product-info-table td {
    color: var(--text-body);
}

/* Reviews */
.product-detail__reviews .section-heading-left {
    margin-bottom: 40px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review-card {
    padding: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: reviewIn 0.35s ease both;
}

@keyframes reviewIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.review-card__name {
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.review-card__date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.review-card__stars {
    color: #f5a623;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.review-card__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-body);
}

.review-form {
    padding: 28px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.review-form__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.review-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.review-form .form-control,
.review-form .form-select {
    border-radius: var(--radius);
    border-color: var(--border);
    font-size: 0.9375rem;
    padding: 10px 14px;
}

.review-form .form-control:focus,
.review-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.review-form__submit {
    width: 100%;
    padding: 12px 24px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.review-form__submit:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Related products — horizontal scroll on mobile */
.related-products-scroll {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px 8px;
    -webkit-overflow-scrolling: touch;
}

.related-products-scroll .row {
    min-width: min(100%, 100%);
}

@media (max-width: 991.98px) {
    .related-products-scroll .row {
        flex-wrap: nowrap !important;
        width: max-content;
        min-width: 100%;
    }

    .related-products-scroll .col {
        flex: 0 0 260px;
        max-width: 260px;
    }
}

/* Toast */
.product-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--text-dark);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.product-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-toast i {
    color: #4ade80;
    font-size: 1.125rem;
}

@media (min-width: 992px) {
    .product-toast {
        bottom: 32px;
    }
}

@media (max-width: 575.98px) {
    .product-info__actions {
        flex-direction: column;
    }

    .product-qty {
        max-width: none;
    }

    .product-info__wishlist {
        width: 100%;
    }
}
