/* مستر اير - Product Page (تصميم العالمية المحسّن) */

/* === Layout === */
.product-page {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    padding: 1.5rem 0 2.5rem;
    align-items: start;
}

/* === Breadcrumb === */
.breadcrumb { margin: 0 0 0.5rem; }
.breadcrumb-list { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb-list a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--primary); }
.breadcrumb-sep { font-size: 0.82rem; color: #ccc; user-select: none; }
.breadcrumb-list .active { color: var(--text-dark); font-weight: 500; }

/* Navigation Icons (Back to shop, prev/next) */
.product-nav-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    direction: ltr;
}
.pnav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    background: #fff;
}
.pnav-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* === Gallery === */
.product-gallery { position: relative; }

/* Vertical layout: thumbnails left, main image right (RTL: thumbs on left, main on right) */
.gallery-layout {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.75rem;
}

/* Main image container */
.gallery-main {
    flex: 1;
    position: relative;
    background: #fff;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    padding: 1rem;
    overflow: hidden;
    cursor: zoom-in;
}
.gallery-main-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.gallery-main:hover .gallery-main-img { transform: scale(1.03); }

/* Zoom button */
.gallery-zoom-btn {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.95);
    color: var(--text-body);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    box-shadow: var(--shadow-sm);
}
.gallery-zoom-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Navigation arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
}
.gallery-nav-btn {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    color: var(--text-body);
}
.gallery-nav-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.gallery-dot.active { background: var(--primary); border-color: var(--primary); transform: scale(1.15); }

/* Badges */
.gallery-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.p-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}
.p-badge-discount { background: var(--danger); }
.p-badge-hot { background: var(--accent); }

/* Vertical Thumbnails (Desktop) */
.gallery-thumbs-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 75px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}
.gallery-thumbs-vertical::-webkit-scrollbar { display: none; }

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}
.gallery-thumb:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,119,200,0.15); }
.gallery-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,200,0.2); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* Horizontal Thumbnails (Mobile fallback) */
.gallery-thumbs-horizontal {
    display: none;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-thumbs-horizontal::-webkit-scrollbar { display: none; }

/* === Product Info === */
.product-info { position: sticky; top: 140px; }

.product-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}
.admin-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}
.admin-edit-btn:hover {
    background: linear-gradient(135deg, #D97706, #B45309);
    transform: translateY(-1px);
}

.product-price-block {
    margin-bottom: 1.25rem;
    padding: 0.75rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.product-price-current {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
}
.product-price-current small { font-size: 1rem; font-weight: 600; }
.product-price-old {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

/* Short Description / Highlights */
.product-highlights {
    font-size: 0.9rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #F8FAFB;
    border-radius: 8px;
    border-right: 3px solid var(--primary);
}

/* Features Box */
.product-features-box {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #f9fff9;
    border-radius: 8px;
    border-right: 3px solid var(--success);
}

/* === Specs Table (مثل العالمية — dotted borders) === */
.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}
.product-specs-table tr {
    border-bottom: 1px dashed #ddd;
}
.product-specs-table tr:last-child { border-bottom: none; }
.product-specs-table th {
    text-align: right;
    padding: 0.7rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
    width: 130px;
    white-space: nowrap;
    vertical-align: middle;
}
.product-specs-table td {
    padding: 0.7rem 0.75rem;
    font-size: 0.9rem;
    color: #333;
    vertical-align: middle;
}
.product-specs-table td a { color: var(--primary); text-decoration: none; }
.product-specs-table td a:hover { text-decoration: underline; }

/* === Actions === */
.product-actions-bar {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    width: 44px;
    height: 48px;
    border: none;
    background: #f5f6f8;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.qty-btn:hover {
    background: var(--primary);
    color: #fff;
}
.qty-btn:active {
    transform: scale(0.93);
}
.qty-selector input {
    width: 52px;
    height: 48px;
    border: none;
    border-right: 1px solid #eee;
    border-left: 1px solid #eee;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
    background: #fff;
}
.qty-selector input::-webkit-inner-spin-button,
.qty-selector input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.add-to-cart-btn {
    flex: 1;
    min-width: 150px;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.add-to-cart-btn:hover { background: var(--accent-hover); }
.add-to-cart-btn:active { transform: scale(0.97); }
.add-to-cart-btn.loading { opacity: 0.7; pointer-events: none; }

.buy-now-btn {
    min-width: 130px;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}
.buy-now-btn:hover { background: var(--primary-hover); color: #fff; }

.out-of-stock-notice {
    background: #FEE2E2;
    color: #DC2626;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Wishlist / Compare */
.product-meta-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.meta-action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
    padding: 0;
}
.meta-action-btn:hover { color: var(--primary); }
.meta-action-btn.active { color: var(--danger); }
.meta-action-btn.active i { font-weight: 900; }

/* Product Meta */
.product-meta-info {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.85rem;
    line-height: 1.9;
}
.meta-line { margin-bottom: 0.35rem; }
.meta-line a { color: var(--primary); text-decoration: none; }
.meta-line a:hover { text-decoration: underline; }
.meta-line strong { color: #555; }

/* Share */
.product-share {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.88rem;
    color: #777;
    padding-top: 0.5rem;
}
.product-share a {
    color: #666;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
}
.product-share a:hover { color: #fff; background: var(--primary); }

/* === Tabs (Desktop) === */
.product-tabs-section {
    margin: 2.5rem 0;
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}
.tabs-nav {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--border);
    background: #FAFBFC;
}
.tab-btn {
    padding: 1rem 1.75rem;
    border: none;
    background: none;
    font-family: inherit;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text-dark); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-body {
    padding: 1.75rem;
    line-height: 2;
    font-size: 0.95rem;
    color: var(--text-body);
}
.tab-body h2, .tab-body h3 { font-size: 1.15rem; color: var(--text-dark); margin-top: 1.5rem; margin-bottom: 0.75rem; }
.tab-body p { margin-bottom: 0.75rem; }
.tab-body img { border-radius: 8px; margin: 0.5rem 0; }

/* Accordion headers (mobile only — hidden on desktop) */
.tab-accordion-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #FAFBFC;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: background 0.2s ease;
}
.tab-accordion-header:hover { background: #f0f5fa; }
.tab-accordion-header i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.tab-accordion-header.open i { transform: rotate(180deg); }
.tab-accordion-header.open { color: var(--primary); background: #EAF7FF; }

/* Desc specs list */
.desc-specs-list { list-style: none; padding: 0; }
.desc-specs-list li {
    padding: 0.45rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
}
.desc-specs-list li i { color: var(--success); margin-top: 0.25rem; flex-shrink: 0; font-size: 0.85rem; }

/* === Reviews System (Premium) === */

/* Overview: Summary + Distribution side by side */
.rv-overview {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: #F8FAFB;
    border-radius: 12px;
    margin-bottom: 1.75rem;
    align-items: center;
}

/* Left: Big average number + stars */
.rv-summary {
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
}
.rv-avg-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-dark, #082A4A);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.rv-avg-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 0.4rem;
}
.rv-avg-stars i {
    font-size: 1rem;
    color: #ddd;
}
.rv-avg-stars i.filled {
    color: #FFB800;
}
.rv-avg-count {
    font-size: 0.82rem;
    color: #888;
}

/* Right: Distribution bars */
.rv-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.rv-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.rv-bar-label {
    font-size: 0.78rem;
    color: #666;
    min-width: 50px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}
.rv-bar-label i {
    color: #FFB800;
    font-size: 0.7rem;
}
.rv-bar-track {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}
.rv-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFB800, #FF9500);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 0;
}
.rv-bar-count {
    font-size: 0.75rem;
    color: #999;
    min-width: 20px;
    text-align: center;
}

/* Review Cards List */
.rv-list {
    margin-bottom: 1.5rem;
}
.rv-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.rv-card:last-child {
    border-bottom: none;
}
.rv-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.6rem;
}
.rv-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #00a3e0);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-card-meta {
    flex: 1;
}
.rv-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.rv-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
}
.rv-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: var(--success, #22C55E);
    font-weight: 600;
    background: #f0fdf4;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}
.rv-verified i {
    font-size: 0.65rem;
}
.rv-card-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.rv-card-stars i {
    font-size: 0.72rem;
    color: #ddd;
}
.rv-card-stars i.filled {
    color: #FFB800;
}
.rv-card-date {
    font-size: 0.75rem;
    color: #aaa;
    margin-right: 0.5rem;
}
.rv-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
    margin: 0.4rem 0 0.25rem;
}
.rv-card-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    margin: 0;
}

/* Load More button */
.rv-load-more {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: none;
    border: 2px dashed #d0e5f7;
    border-radius: 8px;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}
.rv-load-more:hover {
    background: #f0f7ff;
    border-color: var(--primary);
}

/* Empty State */
.rv-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}
.rv-empty i {
    font-size: 2.5rem;
    color: #d0e5f7;
    margin-bottom: 0.75rem;
    display: block;
}
.rv-empty p {
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    margin: 0 0 0.35rem;
}
.rv-empty span {
    font-size: 0.85rem;
    color: #999;
}

/* === Review Form === */
.rv-form-wrap {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #F8FAFB;
    border-radius: 12px;
    border: 1px solid #e8eff5;
}
.rv-form-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark, #082A4A);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}
.rv-form-title i {
    color: var(--primary);
    font-size: 0.9rem;
}

.rv-field {
    margin-bottom: 1rem;
}
.rv-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.4rem;
}
.rv-required {
    color: var(--danger, #E53935);
}
.rv-optional {
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
}

/* Interactive Star Rating Input */
.rv-star-input {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    direction: ltr;
}
.rv-star-input i {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}
.rv-star-input i:hover {
    transform: scale(1.15);
}
.rv-star-input i.hovered,
.rv-star-input i.selected {
    color: #FFB800;
}
.rv-star-input i.selected {
    font-weight: 900;
}
.rv-star-label {
    font-size: 0.82rem;
    color: #999;
    margin-right: 0.5rem;
}

/* Form fields */
.rv-field input[type="text"],
.rv-field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid #dde3ea;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    background: #fff;
}
.rv-field input[type="text"]:focus,
.rv-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,119,200,0.1);
}
.rv-field textarea {
    min-height: 100px;
}

.rv-form-actions {
    margin-top: 0.5rem;
}
.rv-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.rv-submit-btn:hover {
    background: var(--primary-hover, #005FA3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,119,200,0.25);
}
.rv-submit-btn:active {
    transform: translateY(0);
}
.rv-submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Form message */
.rv-form-msg {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0;
    border-radius: 6px;
    display: none;
}
.rv-form-msg.show {
    display: block;
    padding: 0.75rem 1rem;
}
.rv-form-msg.success {
    background: #f0fdf4;
    color: var(--success, #22C55E);
    border: 1px solid #bbf7d0;
}
.rv-form-msg.error {
    background: #fef2f2;
    color: var(--danger, #E53935);
    border: 1px solid #fecaca;
}

/* === Status Boxes (guest, not_purchased, already_reviewed) === */
.rv-status-box {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}
.rv-status-box i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}
.rv-status-box p {
    font-size: 0.92rem;
    color: #555;
    margin: 0 0 0.75rem;
    line-height: 1.7;
}

/* Guest: login prompt */
.rv-status-login {
    background: #f0f7ff;
    border: 1px dashed #d0e5f7;
}
.rv-status-login i {
    color: var(--primary);
}
.rv-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.rv-login-btn:hover {
    background: var(--primary-hover, #005FA3);
    color: #fff;
    transform: translateY(-1px);
}

/* Not purchased */
.rv-status-info {
    background: #FFFBEB;
    border: 1px dashed #FDE68A;
}
.rv-status-info i {
    color: #F59E0B;
}

/* Already reviewed */
.rv-status-done {
    background: #f0fdf4;
    border: 1px dashed #bbf7d0;
}
.rv-status-done i {
    color: var(--success, #22C55E);
}
.rv-own-review {
    text-align: right;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8eff5;
}
.rv-own-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 0.4rem;
}
.rv-own-stars i {
    font-size: 0.85rem;
    color: #ddd;
}
.rv-own-stars i.filled {
    color: #FFB800;
}
.rv-own-review strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}
.rv-own-review p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.7;
    text-align: right;
}
.rv-own-review small {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: #888;
    background: #f5f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* === Shipping === */
.shipping-info { list-style: none; padding: 0; }
.shipping-info li {
    padding: 0.85rem 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    border-bottom: 1px solid #f5f5f5;
}
.shipping-info li:last-child { border-bottom: none; }
.shipping-info li i { color: var(--primary); width: 22px; text-align: center; font-size: 1rem; }

/* === Lightbox === */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.92); cursor: pointer; }
.lightbox-img { max-width: 85vw; max-height: 85vh; object-fit: contain; border-radius: 4px; position: relative; z-index: 1; }
.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.1); border: none; color: white;
    font-size: 1.5rem; cursor: pointer; z-index: 10;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: absolute; top: 50%;
    background: rgba(255,255,255,0.12); border: none; color: white;
    width: 48px; height: 48px; border-radius: 50%;
    cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-50%); z-index: 10;
    transition: background 0.2s ease;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { right: 1.5rem; }
.lightbox-next { left: 1.5rem; }
.lightbox-counter {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.7); font-size: 0.88rem; z-index: 10;
}

/* === Sticky Buy Bar (Premium — Desktop + Mobile) === */
.sticky-buy-bar {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 -4px 25px rgba(0,0,0,0.08);
    z-index: 299;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-buy-bar.visible {
    transform: translateY(0);
}
.sbb-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
/* Desktop: leave space for brand rail */
@media (min-width: 1025px) {
    .sbb-inner { padding-right: calc(72px + 1.5rem); }
}

.sbb-product-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}
.sbb-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
    padding: 2px;
}
.sbb-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Pricing group */
.sbb-pricing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    white-space: nowrap;
}
.sbb-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
}
.sbb-price small { font-size: 0.7rem; font-weight: 600; }
.sbb-price-old {
    font-size: 0.78rem;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}
.sbb-discount {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    background: var(--success);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    line-height: 1;
}

/* Qty controls — compact */
.sbb-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e3e8;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
}
.sbb-qty-btn {
    width: 30px;
    height: 32px;
    border: none;
    background: #f8f9fb;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.sbb-qty-btn:hover { background: var(--primary); color: #fff; }
.sbb-qty-val {
    width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    background: #fff;
    border: none;
    border-right: 1px solid #eee;
    border-left: 1px solid #eee;
    font-family: inherit;
}
.sbb-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Buttons — compact like alalamiaa */
.sbb-cart-btn {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--gradient-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255,138,0,0.2);
}
.sbb-cart-btn:hover { box-shadow: 0 4px 14px rgba(255,138,0,0.35); transform: translateY(-1px); }
.sbb-cart-btn:active { transform: translateY(0) scale(0.98); }
.sbb-cart-btn.loading { opacity: 0.7; pointer-events: none; }
.sbb-cart-btn i { font-size: 0.78rem; }

.sbb-buy-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,119,200,0.2);
}
.sbb-buy-btn:hover { box-shadow: 0 4px 14px rgba(0,119,200,0.35); transform: translateY(-1px); color: #fff; }
.sbb-buy-btn i { font-size: 0.78rem; }

.sbb-compare-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e3e8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.sbb-compare-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

/* Sticky bar out of stock */
.sbb-oos-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
    white-space: nowrap;
}
.sbb-whatsapp-btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === Related Products === */
.related-section { margin-top: 2rem; margin-bottom: 2rem; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* === Responsive === */

/* Tablet */
@media (max-width: 1024px) {
    .product-page { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .product-info { position: static; }
    .related-grid { grid-template-columns: repeat(3, 1fr); }
    .sbb-name { max-width: 200px; }
}

/* Mobile */
@media (max-width: 767px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.5rem 0 1rem;
    }

    /* Gallery: switch to horizontal thumbs */
    .gallery-layout { flex-direction: column; }
    .gallery-thumbs-vertical { display: none; }
    .gallery-thumbs-horizontal {
        display: flex;
    }
    .gallery-thumbs-horizontal .gallery-thumb {
        width: 60px;
        height: 60px;
    }
    .gallery-main { border-radius: 8px; padding: 0.75rem; }

    /* Info */
    .product-info { position: static; }
    .product-title { font-size: 1.2rem; line-height: 1.7; }
    .product-price-current { font-size: 1.4rem; }
    .product-price-block { margin-bottom: 0.75rem; padding: 0.5rem 0; }

    /* Nav icons */
    .product-nav-icons { display: none; }

    /* Specs */
    .product-specs-table th { width: 100px; font-size: 0.84rem; padding: 0.55rem 0.5rem; }
    .product-specs-table td { font-size: 0.84rem; padding: 0.55rem 0.5rem; }

    /* Actions */
    .product-actions-bar { flex-wrap: wrap; }
    .add-to-cart-btn { flex: 1; min-width: 120px; font-size: 0.92rem; padding: 0.7rem 1rem; }
    .buy-now-btn { flex: 1; min-width: 100px; font-size: 0.92rem; padding: 0.7rem 1rem; }

    /* Tabs → Accordion */
    .tabs-nav { display: none; }
    .tab-accordion-header { display: flex; }
    .tab-content { display: none !important; }
    .tab-content.accordion-open { display: block !important; }
    .tab-body { padding: 1rem; font-size: 0.9rem; }

    /* Sticky bar on mobile: 2-row layout */
    .sticky-buy-bar { bottom: var(--bottom-nav-height); }
    .sbb-product-info { display: none; }
    .sbb-compare-btn { display: none; }

    .sbb-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0.4rem 0.6rem;
        padding: 0.5rem 0.75rem;
        align-items: center;
    }

    /* Row 1: Price (left) + Qty (right) */
    .sbb-pricing {
        gap: 0.3rem;
        flex: none;
        grid-column: 1;
        grid-row: 1;
    }
    .sbb-price { font-size: 0.85rem; }
    .sbb-price-old { font-size: 0.72rem; }
    .sbb-discount { font-size: 0.65rem; padding: 0.1rem 0.3rem; }

    .sbb-qty {
        grid-column: 2;
        grid-row: 1;
    }
    .sbb-qty-btn { width: 28px; height: 30px; font-size: 0.9rem; }
    .sbb-qty-val { width: 26px; font-size: 0.82rem; }

    /* Row 2: Cart + Buy buttons side by side */
    .sbb-cart-btn {
        grid-column: 1;
        grid-row: 2;
        font-size: 0.82rem;
        padding: 0.5rem 0.5rem;
        min-height: 40px;
        border-radius: 8px;
    }
    .sbb-cart-btn i { font-size: 0.75rem; }

    .sbb-buy-btn {
        grid-column: 2;
        grid-row: 2;
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
        min-height: 40px;
        border-radius: 8px;
        white-space: nowrap;
    }
    .sbb-buy-btn .sbb-buy-text { display: inline; }
    .sbb-buy-btn i { margin: 0; font-size: 0.75rem; }

    /* Lightbox */
    .lightbox-img { max-width: 95vw; max-height: 80vh; }
    .lightbox-nav { width: 40px; height: 40px; font-size: 0.9rem; }

    /* Related Products */
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    /* Bottom padding for sticky bar + bottom nav */
    .product-page-wrapper { padding-bottom: calc(90px + var(--bottom-nav-height)); }

    /* WhatsApp button above sticky bar */
    body.has-product-sticky .whatsapp-float {
        bottom: calc(90px + var(--bottom-nav-height) + 0.75rem) !important;
    }
    /* AC Wizard floating above sticky bar on mobile */
    body.has-product-sticky .acw-float {
        bottom: calc(90px + var(--bottom-nav-height) + 0.75rem) !important;
    }
    /* Scroll-top above WhatsApp on product sticky */
    body.has-product-sticky .scroll-top {
        bottom: calc(90px + var(--bottom-nav-height) + 70px) !important;
    }
}

/* Desktop sticky bar padding */
@media (min-width: 768px) {
    body.has-product-sticky { padding-bottom: 70px; }
    body.has-product-sticky .whatsapp-float {
        bottom: calc(70px + 1rem) !important;
    }
    /* AC Wizard floating above sticky bar on desktop */
    body.has-product-sticky .acw-float {
        bottom: calc(70px + 1rem) !important;
    }
    /* Scroll-top above WhatsApp on product sticky */
    body.has-product-sticky .scroll-top {
        bottom: calc(70px + 80px) !important;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .product-title { font-size: 1.1rem; }
    .product-price-current { font-size: 1.25rem; }
    .gallery-thumbs-horizontal .gallery-thumb { width: 50px; height: 50px; }
    .related-grid { gap: 0.5rem; }
}


/* --- Reviews Responsive --- */
@media (max-width: 767px) {
    .rv-overview { flex-direction: column; gap: 1rem; padding: 1rem; }
    .rv-summary { width: 100%; }
    .rv-avg-number { font-size: 2.5rem; }
    .rv-form-wrap { padding: 1rem; }
    .rv-card-header { gap: 0.6rem; }
    .rv-avatar { width: 36px; height: 36px; min-width: 36px; font-size: 0.85rem; }
    .rv-star-input i { font-size: 1.8rem; }
    .rv-status-box { padding: 1.25rem; }
}

/* ============================= */
/* === Admin Preview Bar     === */
/* ============================= */
.preview-admin-bar {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 16px rgba(217, 119, 6, 0.35);
    font-family: var(--font-family, 'Tajawal', sans-serif);
}
.preview-bar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.preview-bar-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.88rem;
}
.preview-bar-info > i {
    font-size: 1.1rem;
    opacity: 0.9;
}
.preview-bar-badge {
    background: rgba(255,255,255,0.22);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.25);
}
.preview-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.preview-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.18);
    color: #fff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.preview-bar-btn:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-1px);
}
.preview-bar-btn i {
    font-size: 0.78rem;
}

@media (max-width: 600px) {
    .preview-bar-inner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 8px 15px;
        text-align: center;
    }
    .preview-bar-info {
        font-size: 0.82rem;
    }
}
