/* Jahan Airpod - Turquoise Digikala-Style CSS */
:root {
    --ja-primary: #0891b2;
    --ja-primary-light: #06b6d4;
    --ja-primary-cyan: #00d2d3;
    --ja-primary-soft: #ecfeff;
    --ja-dark: #0f172a;
    --ja-dark-soft: #1e293b;
    --ja-text: #1e293b;
    --ja-muted: #64748b;
    --ja-bg: #f8fafc;
    --ja-card-bg: #ffffff;
    --ja-border: #e2e8f0;
    --ja-gold: #f59e0b;
    --ja-red: #ef4444;
    --ja-radius: 14px;
    --ja-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --ja-shadow-md: 0 4px 14px rgba(0,0,0,0.07);
    --ja-shadow-lg: 0 10px 25px rgba(8,145,178,0.15);
}

body.ja-digi-body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--ja-bg);
    color: var(--ja-text);
    line-height: 1.8;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ja-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Top Announcement */
.ja-top-promo-banner {
    background: var(--ja-dark);
    color: #ffffff;
    padding: 8px 0;
    font-size: 12.5px;
    border-bottom: 2px solid var(--ja-primary-light);
}

.ja-promo-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ja-promo-phone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ja-phone-link {
    color: #38bdf8;
    font-weight: 800;
    font-size: 14px;
}

/* Main Sticky Header */
.ja-main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--ja-border);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--ja-shadow-sm);
}

.ja-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.ja-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ja-logo-icon {
    font-size: 32px;
    background: linear-gradient(135deg, var(--ja-primary-light), var(--ja-primary));
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}

.ja-logo-titles {
    display: flex;
    flex-direction: column;
}

.ja-brand-name {
    font-size: 20px;
    font-weight: 900;
    color: var(--ja-dark);
    line-height: 1.2;
}

.ja-brand-sub {
    font-size: 11px;
    color: var(--ja-primary);
    font-weight: 600;
}

/* Search Box with Live Dropdown */
.ja-search-area {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.ja-search-box {
    position: relative;
    width: 100%;
}

.ja-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ja-muted);
}

#ja-header-search-input {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid transparent;
    padding: 11px 48px 11px 20px;
    border-radius: 25px;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
}

#ja-header-search-input:focus {
    background: #ffffff;
    border-color: var(--ja-primary-light);
    box-shadow: 0 0 0 4px rgba(6,182,212,0.15);
}

#ja-search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #ffffff;
    border: 1px solid var(--ja-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.ja-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.ja-search-item:hover {
    background: var(--ja-primary-soft);
}

.ja-search-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

/* Actions: Call & Cart */
.ja-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ja-call-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--ja-border);
    padding: 7px 14px;
    border-radius: 10px;
}

.ja-call-action-btn:hover {
    border-color: var(--ja-primary);
    background: var(--ja-primary-soft);
}

.ja-call-badge {
    background: var(--ja-primary-soft);
    color: var(--ja-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ja-call-text {
    display: flex;
    flex-direction: column;
}

.ja-call-label {
    font-size: 10.5px;
    color: var(--ja-muted);
}

.ja-call-num {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ja-dark);
}

.ja-cart-header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--ja-primary-light), var(--ja-primary));
    color: #fff;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: 0 4px 12px rgba(8,145,178,0.25);
    cursor: pointer;
}

.ja-cart-header-btn:hover {
    filter: brightness(1.06);
    color: #fff;
}

.ja-cart-icon-wrap {
    position: relative;
}

.ja-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--ja-red);
    color: #fff;
    font-size: 10.5px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 2px solid #fff;
}

/* Sub-nav Menu */
.ja-sub-nav {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.ja-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
}

.ja-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    gap: 20px;
    white-space: nowrap;
}

.ja-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ja-nav-link:hover, .ja-nav-link.active {
    color: var(--ja-primary);
}

.ja-incredible-link {
    color: var(--ja-red) !important;
    font-weight: 800;
}

.ja-delivery-city {
    font-size: 12px;
    color: var(--ja-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: bold;
}

/* Incredible Offers Box */
.sa-incredible-section {
    background: linear-gradient(135deg, var(--ja-primary) 0%, var(--ja-primary-light) 100%);
    border-radius: var(--ja-radius);
    padding: 24px;
    margin: 25px 0 35px;
    box-shadow: var(--ja-shadow-lg);
}

.sa-inc-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sa-inc-branding {
    width: 170px;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
}

.sa-inc-icon {
    font-size: 50px;
    margin-bottom: 4px;
}

.sa-inc-title {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 12px;
}

.sa-inc-timer {
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
}

.sa-inc-slider {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* Product Card */
.sa-product-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--ja-border);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.sa-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.09);
    border-color: var(--ja-primary-light);
}

.sa-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ja-red);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    z-index: 2;
}

.sa-p-img {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
}

.sa-p-img img {
    max-height: 140px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sa-product-card:hover .sa-p-img img {
    transform: scale(1.07);
}

.sa-p-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ja-dark);
    margin: 0 0 8px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.sa-p-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 11px;
    color: var(--ja-muted);
}

.sa-p-rating {
    color: var(--ja-gold);
    font-weight: bold;
}

.sa-p-price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--ja-border);
}

.sa-old-price {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: line-through;
    display: block;
}

.sa-final-price {
    font-size: 15px;
    font-weight: 900;
    color: var(--ja-dark);
}

.sa-btn-cart {
    background: var(--ja-primary-soft);
    color: var(--ja-primary);
    border: 1px solid rgba(8,145,178,0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sa-btn-cart:hover {
    background: var(--ja-primary);
    color: #fff;
}

/* Category Circles */
.sa-circle-cats-section {
    margin: 30px 0;
}

.sa-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sa-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ja-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sa-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--ja-primary-light);
    border-radius: 4px;
}

.sa-circle-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.sa-circle-item {
    background: #ffffff;
    border: 1px solid var(--ja-border);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.sa-circle-item:hover, .sa-circle-item.active {
    border-color: var(--ja-primary-light);
    transform: translateY(-3px);
    box-shadow: var(--ja-shadow-md);
}

.sa-circle-icon-wrap {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--ja-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 10px;
    border: 2px solid #cffafe;
    transition: all 0.2s ease;
}

.sa-circle-item:hover .sa-circle-icon-wrap {
    background: linear-gradient(135deg, var(--ja-primary-light), var(--ja-primary));
    transform: scale(1.08);
}

.sa-circle-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ja-dark);
}

/* Modal for Product Quick View (Opening Sections) */
#ja-product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ja-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 850px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.ja-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #475569;
    z-index: 10;
}

.ja-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.ja-modal-body {
    padding: 30px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
}

.ja-modal-gallery img {
    width: 100%;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--ja-border);
}

.ja-modal-info h2 {
    font-size: 20px;
    font-weight: 900;
    color: var(--ja-dark);
    margin: 0 0 12px;
    line-height: 1.4;
}

.ja-modal-specs {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    margin: 15px 0;
    font-size: 12.5px;
    color: #475569;
    line-height: 2;
}

.ja-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Cart Drawer */
#ja-cart-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    z-index: 999999;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#ja-cart-drawer.open {
    left: 0;
}

.ja-drawer-header {
    padding: 18px 20px;
    background: var(--ja-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ja-drawer-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.ja-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--ja-border);
    background: #f8fafc;
}

/* Floating Sole Call Button */
.ja-floating-call {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: linear-gradient(135deg, var(--ja-primary-light), var(--ja-primary));
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(6,182,212,0.45);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 14.5px;
    z-index: 9999;
    direction: ltr;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ja-floating-call:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 12px 30px rgba(6,182,212,0.6);
    color: #fff;
}

/* Footer */
.ja-footer {
    background: var(--ja-dark);
    color: #cbd5e1;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 4px solid var(--ja-primary-light);
}

.ja-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 40px;
}

.ja-footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 16px;
    position: relative;
    padding-bottom: 8px;
}

.ja-footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--ja-primary-light);
}

.ja-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ja-footer-col ul li {
    margin-bottom: 10px;
}

.ja-footer-col ul li a {
    color: #94a3b8;
    font-size: 13px;
    transition: all 0.2s ease;
}

.ja-footer-col ul li a:hover {
    color: var(--ja-primary-light);
    padding-right: 4px;
}

.ja-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: 12.5px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 992px) {
    .sa-inc-row { flex-direction: column; }
    .sa-inc-branding { width: 100%; }
    .sa-inc-slider { grid-template-columns: repeat(2, 1fr); width: 100%; }
    .sa-circle-grid { grid-template-columns: repeat(3, 1fr); }
    .ja-modal-body { grid-template-columns: 1fr; }
    .ja-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .ja-header-row { flex-wrap: wrap; }
    .ja-search-area { order: 3; width: 100%; max-width: 100%; }
    .sa-inc-slider { grid-template-columns: 1fr; }
    .sa-circle-grid { grid-template-columns: repeat(2, 1fr); }
    .ja-footer-grid { grid-template-columns: 1fr; }
    #ja-cart-drawer { width: 320px; }
}
