/* ============================================================
   store-style.css — تصميم متاجر معلم
   يُضاف في store_header.php بعد style.css
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* ============================================================
   STORE HERO
   ============================================================ */
.store-hero {
    position: relative;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    padding: 0;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.store-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(.45);
    z-index: 0;
}

.store-hero-content {
    position: relative;
    z-index: 1;
    padding: 50px 20px 40px;
    width: 100%;
}

.store-logo {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.store-name {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    padding-bottom: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.store-name::after { display: none; }

.store-tagline {
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 20px;
    max-width: 600px;
}

.store-location {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.store-contacts .button {
    border-radius: 50px;
    padding: 10px 22px;
    font-size: .95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    backdrop-filter: blur(4px);
    transition: transform .2s, box-shadow .2s;
}

.store-contacts .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.store-contacts .primary-button {
    background: #fff;
    color: #1a73e8 !important;
}

.store-contacts .whatsapp-button {
    background: #25D366;
    color: #fff !important;
}

/* ============================================================
   CATEGORY FILTER
   ============================================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    background: #fff;
    color: #555;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: 'Cairo', sans-serif;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,115,232,.3);
}

/* ============================================================
   PRODUCTS GRID — بطاقات المنتجات
   ============================================================ */
.store-catalog {
    padding: 60px 0;
    background: var(--light-bg);
}

/* override professional-card للمنتجات */
.product-card {
    padding: 0 !important;
    text-align: right !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #eef0f4 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.06) !important;
    transition: transform .25s, box-shadow .25s !important;
}

.product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}

.product-card .card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card .card-link::after { display: none; }

/* صورة المنتج */
.product-card .card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f7fa;
}

.product-card .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.product-card:hover .card-image-wrap img {
    transform: scale(1.06);
}

/* badge التوفر */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    z-index: 2;
    letter-spacing: .3px;
}

.status-badge.active {
    background: rgba(40,167,69,.15);
    color: #1a7a3a;
    border: 1px solid rgba(40,167,69,.3);
}

.status-badge.inactive {
    background: rgba(220,53,69,.12);
    color: #b02030;
    border: 1px solid rgba(220,53,69,.25);
}

/* محتوى الكارد */
.product-card .card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.product-card .card-category {
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(26,115,232,.08);
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
    width: fit-content;
}

.product-card .card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.product-card .card-name::after { display: none; }

.product-card .card-desc {
    font-size: .85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-price {
    font-size: 1.15rem;
    color: #1a7a3a;
    font-weight: 800;
    margin: 4px 0 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.product-card .card-price .currency {
    font-size: .8rem;
    font-weight: 600;
    color: #888;
}

.product-card .btn-sm {
    margin-top: auto;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
    background: var(--primary-color);
    color: #fff !important;
    display: block;
    transition: background .2s, transform .2s;
}

.product-card .btn-sm::after { display: none; }

.product-card:hover .btn-sm {
    background: var(--primary-hover);
    transform: none;
}

/* ============================================================
   STORE SEO SECTIONS
   ============================================================ */
.store-seo-section {
    padding: 60px 0;
    background: #fff;
}

.store-seo-section:nth-child(even) {
    background: var(--light-bg);
}

.store-seo-section h2 {
    font-size: 1.7rem;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.seo-content {
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
}

.seo-content h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin: 28px 0 12px;
}

.seo-content ul, .seo-content ol {
    padding-right: 24px;
    margin-bottom: 16px;
}

.seo-content li {
    margin-bottom: 6px;
}

/* ============================================================
   NICE TABLE
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.nice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.nice-table caption {
    font-size: .85rem;
    color: #888;
    text-align: right;
    padding: 8px 16px;
    caption-side: top;
}

.nice-table thead th {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    font-size: .9rem;
}

.nice-table tbody tr:nth-child(odd)  { background: #f8faff; }
.nice-table tbody tr:nth-child(even) { background: #fff; }

.nice-table tbody tr:hover { background: #eef4ff; }

.nice-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #eef0f4;
    color: #444;
}

/* ============================================================
   FAQ
   ============================================================ */
.store-faq {
    padding: 60px 0;
    background: #fff;
}

.faq-item {
    background: #f8faff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 14px;
    border-right: 4px solid var(--primary-color);
    transition: box-shadow .2s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(26,115,232,.1);
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    padding-bottom: 0;
}

.faq-item h3::after { display: none; }

.faq-item p {
    font-size: .92rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================
   AREAS
   ============================================================ */
.store-areas {
    padding: 60px 0;
    background: var(--light-bg);
}

/* ============================================================
   CTA
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    padding: 70px 20px;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.cta-section h2::after { background: rgba(255,255,255,.4); }

.cta-section p, .cta-section div {
    color: rgba(255,255,255,.9);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.cta-buttons .button {
    padding: 13px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s;
}

.cta-buttons .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.cta-buttons .primary-button {
    background: #fff;
    color: #1a73e8 !important;
}

.cta-buttons .whatsapp-button {
    background: #25D366;
    color: #fff !important;
}

/* ============================================================
   PRODUCT PAGE
   ============================================================ */
.product-main {
    padding: 40px 0 60px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Gallery */
.product-gallery { position: sticky; top: 80px; }

.main-image-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: #f5f7fa;
    aspect-ratio: 1;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}

.main-product-image:hover { transform: scale(1.03); }

.thumbnails-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, transform .2s;
    opacity: .7;
}

.thumb:hover, .thumb.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.05);
}

/* تفاصيل المنتج */
.product-details { padding-top: 8px; }

.profession-badge {
    display: inline-block;
    background: rgba(26,115,232,.1);
    color: var(--primary-color);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-brand, .product-sku {
    font-size: .9rem;
    color: #666;
    margin-bottom: 8px;
}

.product-price-large {
    font-size: 2rem;
    font-weight: 900;
    color: #1a7a3a;
    margin: 16px 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-price-large span {
    font-size: 1rem;
    color: #888;
    font-weight: 600;
}

.availability-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.availability-status.active {
    background: rgba(40,167,69,.1);
    color: #1a7a3a;
    border: 1px solid rgba(40,167,69,.3);
}

.availability-status.inactive {
    background: rgba(220,53,69,.1);
    color: #b02030;
    border: 1px solid rgba(220,53,69,.25);
}

.product-short-desc {
    font-size: .98rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8faff;
    border-radius: 10px;
    border-right: 3px solid var(--primary-color);
}

/* أزرار التواصل */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-buttons .button {
    padding: 13px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s;
}

.contact-buttons .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

.contact-buttons .whatsapp-button {
    background: #25D366;
    color: #fff !important;
}

.contact-buttons .primary-button {
    background: var(--primary-color);
    color: #fff !important;
}

.contact-buttons .button::after { display: none; }

/* breadcrumb */
.breadcrumb-nav {
    background: #f8faff;
    border-bottom: 1px solid #eef0f4;
    padding: 12px 0;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: .88rem;
    color: #888;
}

.breadcrumb li:not(:last-child)::after {
    content: '←';
    margin-right: 6px;
    color: #ccc;
    font-size: .8rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a::after { display: none; }

.breadcrumb li:last-child { color: #444; font-weight: 600; }

/* وصف المنتج الكامل */
.product-full-desc {
    padding: 60px 0;
    background: var(--light-bg);
}

/* منتجات ذات صلة */
.related-products {
    padding: 60px 0;
    background: #fff;
}

/* ============================================================
   STORES LIST PAGE
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 8px;
}

.page-hero h1::after { background: rgba(255,255,255,.4); margin: 10px auto 0; }

.page-hero p {
    color: rgba(255,255,255,.85);
    font-size: 1.05rem;
}

.stores-list-section {
    padding: 50px 0;
    background: var(--light-bg);
}

.results-count {
    color: #888;
    font-size: .9rem;
    margin-bottom: 20px;
}

/* كارد المتجر في قائمة المتاجر */
.store-card {
    padding: 0 !important;
    text-align: right !important;
}

.store-card .card-image-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #ddd;
}

.store-card .card-image-wrap img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.store-card:hover .card-image-wrap img:first-child {
    transform: scale(1.06);
}

.store-card-logo {
    position: absolute !important;
    bottom: -24px;
    right: 16px;
    width: 52px !important;
    height: 52px !important;
    border-radius: 10px !important;
    border: 3px solid #fff !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
    object-fit: cover;
}

.store-card .card-content {
    padding: 36px 16px 18px;
}

.store-card .card-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.store-card .card-name::after { display: none; }

.store-card .card-city {
    font-size: .82rem;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.store-card .card-desc {
    font-size: .85rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card .card-count {
    font-size: .82rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .product-gallery { position: static; }

    .store-hero { min-height: 260px; }

    .store-hero-content { padding: 40px 16px 30px; }

    .store-name { font-size: 1.5rem; }

    .product-price-large { font-size: 1.6rem; }

    .contact-buttons .button { padding: 11px 20px; font-size: .88rem; }

    .cta-section { padding: 50px 16px; }

    .store-seo-section,
    .store-faq,
    .store-areas,
    .store-catalog,
    .product-main,
    .product-full-desc,
    .related-products { padding: 40px 0; }
}

@media (max-width: 480px) {
    .filter-btn { padding: 6px 14px; font-size: .82rem; }
    .store-contacts .button { padding: 9px 18px; font-size: .88rem; }
    .thumbnails-row .thumb { width: 58px; height: 58px; }
}
