/* Shared product / landing page styles — light default, dark via data-theme */

body.product-page {
    --p-bg: #f8fafc;
    --p-surface: #ffffff;
    --p-surface-2: #f1f5f9;
    --p-border: rgba(15, 23, 42, 0.1);
    --p-text: #0f172a;
    --p-muted: #64748b;
    --p-soft: #475569;
    --p-accent: #0284c7;
    --p-accent-bright: #0284c7;
    font-family: var(--sans, 'Cairo', sans-serif);
    background: var(--p-bg);
    color: var(--p-text);
    direction: rtl;
}

[data-theme="dark"] body.product-page {
    --p-bg: #09090b;
    --p-surface: #18181b;
    --p-surface-2: #0e0e0e;
    --p-border: rgba(255, 255, 255, 0.08);
    --p-text: #ffffff;
    --p-muted: #a1a1aa;
    --p-soft: #d4d4d8;
    --p-accent: #38bdf8;
    --p-accent-bright: #38bdf8;
}

body.product-page a { text-decoration: none; color: inherit; }

.page-body {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--p-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--p-accent);
    font-weight: 600;
}

.breadcrumb a:hover { text-decoration: underline; }

.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 820px) {
    .main-grid { grid-template-columns: 1fr; }
}

.content-box,
.tabs-box,
.widget {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    color: var(--p-text);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .content-box,
[data-theme="dark"] .tabs-box,
[data-theme="dark"] .widget {
    box-shadow: none;
}

.platform-tag {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--p-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 8px 0 12px;
    color: var(--p-text);
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--p-muted);
}

.stars {
    color: #f5a623;
    font-size: 1rem;
    letter-spacing: 1px;
}

.rating-val {
    font-weight: 800;
    color: var(--p-text);
}

.product-visual-strip {
    border-radius: 14px;
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid var(--p-border);
    background: var(--p-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-visual-strip img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.attrs-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--p-border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 18px;
}

.attr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--p-border);
    font-size: 0.84rem;
}

.attr-row:last-child { border-bottom: none; }
.attr-key { color: var(--p-muted); font-weight: 500; }
.attr-val { font-weight: 700; color: var(--p-text); text-align: start; }

.tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--p-border);
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 10px;
    font-family: var(--sans, 'Cairo', sans-serif);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--p-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn.on {
    color: var(--p-accent);
    border-bottom-color: var(--p-accent);
}

.tab-panel { display: none; }
.tab-panel.on { display: block; }

.tab-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 18px 0 10px;
    color: var(--p-text);
}

.tab-panel h3:first-child { margin-top: 0; }

.tab-panel p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--p-soft);
    margin-bottom: 14px;
}

.tab-panel ul,
.tab-panel ol {
    padding-inline-start: 1.25rem;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.tab-panel li {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--p-soft);
}

.sidebar { position: sticky; top: 76px; }

.price-card-box {
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .price-card-box {
    box-shadow: none;
}

.price-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.price-label-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--p-muted);
}

.price-save-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.12);
    padding: 3px 8px;
    border-radius: 5px;
    line-height: 1.3;
    white-space: nowrap;
    align-self: center;
}

[data-theme="dark"] .price-save-badge {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.15);
}

.price-main-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 0;
}

.price-num-big {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--p-text);
    line-height: 1;
}

.price-curr {
    font-size: 1rem;
    font-weight: 800;
    color: var(--p-accent-bright);
}

.price-was-line {
    font-size: 0.9rem;
    color: var(--p-muted);
    text-decoration: line-through;
    margin-inline-end: 2px;
}

.btn-buy {
    display: block;
    text-align: center;
    width: 100%;
    background: var(--btn-gradient, linear-gradient(135deg, #0284c7, #0066cc));
    color: var(--btn-text, #ffffff);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-family: var(--sans, 'Cairo', sans-serif);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
}

.btn-buy:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.38);
}

.btn-add-cart {
    display: block;
    text-align: center;
    width: 100%;
    background: var(--btn-gradient, linear-gradient(135deg, #0284c7, #0066cc));
    color: var(--btn-text, #ffffff);
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-family: var(--sans, 'Cairo', sans-serif);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.28);
}

.btn-add-cart:hover {
    background: var(--btn-hover-bg, #0284c7);
    opacity: 0.95;
}

/* Payment logos — never stretch / overlap */
.pay-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: auto;
    max-width: 100%;
    margin: 16px auto 0;
    flex-wrap: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

.pay-methods__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    flex: 0 0 auto;
    min-width: auto;
}

.pay-methods__item svg {
    width: auto;
    height: 22px;
    max-height: 22px;
    display: block;
    overflow: visible;
    flex-shrink: 0;
}

.pay-methods-img {
    display: block;
    width: 200px;
    max-width: 92%;
    height: auto;
    margin: 16px auto 0;
    object-fit: contain;
}

.pay-methods__visa { color: #1a1f71; }
.pay-methods__mc { color: #111827; }
.pay-methods__ap { color: #111827; }

[data-theme="dark"] .pay-methods__visa { color: #93a0ff; }
[data-theme="dark"] .pay-methods__mc { color: #f4f4f5; }
[data-theme="dark"] .pay-methods__ap { color: #f4f4f5; }

/* Theme-safe product text */
.content-box p,
.widget p {
    color: var(--p-text);
}

.attr-val a {
    color: var(--p-accent) !important;
}

.product-page-footer,
body.product-page > footer {
    color: var(--p-muted) !important;
}

/* Never show floating WA / theme outside the menu */
.fixed-floating-tools,
.floating-whatsapp-btn {
    display: none !important;
}

.btn-pay {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--btn-gradient, linear-gradient(135deg, #0284c7, #0066cc));
    color: var(--btn-text, #ffffff);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-family: var(--sans, 'Cairo', sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.28);
    transition: opacity 0.2s;
}
.btn-pay:hover { opacity: 0.92; }

body.product-page > footer {
    background: var(--p-surface) !important;
    color: var(--p-muted) !important;
    border-color: var(--p-border) !important;
}
