/*
Theme Name: Astra Child - متجر الملابس
Template: astra
Version: 1.0
Text Domain: astra-child
*/

:root {
    --bg:      #0d0d0f;
    --bg2:     #131318;
    --bg3:     #1c1c24;
    --purple:  #7c3aed;
    --purple2: #a855f7;
    --red:     #e63946;
    --gold:    #f4c542;
    --white:   #ffffff;
    --text:    #d4d4d8;
    --muted:   #71717a;
    --border:  rgba(255,255,255,0.07);
    --glow:    rgba(124,58,237,0.4);
    --font:    'Tajawal', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    overflow-x: hidden;
}

a { text-decoration: none !important; color: inherit; }
img { display: block; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ── ASTRA OVERRIDES ── */
.site-header, .main-header-bar, #masthead {
    background: #0d0d0f !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
}
.ast-site-identity a, .site-title a {
    color: var(--white) !important;
    font-weight: 900 !important;
    font-size: 1.4rem !important;
    letter-spacing: 1px;
}
.ast-above-header-bar, .ast-below-header-bar { display: none !important; }
#secondary, .widget-area { display: none !important; }

/* Fix layout - force full width vertical stacking */
#page, .site, #content, .ast-container,
#primary, .content-area,
.site-content, .ast-article-post,
.ast-post-format-standard, .entry-content,
.post-entry, .single-layout-1 {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
}

.ast-container { padding-left: 0 !important; padding-right: 0 !important; }

/* Remove any flex from content wrappers */
.site-content > .ast-container,
#content > .ast-container {
    display: block !important;
}

.main-header-menu .menu-item a { color: var(--muted) !important; font-family: var(--font); }
.main-header-menu .menu-item a:hover { color: var(--purple2) !important; }

/* ══════════════════════════════
   SLIDER
══════════════════════════════ */
.slider-section {
    position: relative;
    background: var(--bg);
    overflow: hidden;
    user-select: none;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.slide {
    min-width: 100%;
    position: relative;
    height: 520px;
    flex-shrink: 0;
}

@media(max-width:768px) { .slide { height: 320px; } }

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        rgba(13,13,15,0.95) 0%,
        rgba(13,13,15,0.6) 45%,
        transparent 75%
    );
}

.slide-content {
    position: absolute;
    bottom: 0; right: 0;
    padding: 40px 60px;
    max-width: 520px;
    z-index: 2;
}

@media(max-width:768px) {
    .slide-content { padding: 20px 20px; max-width: 100%; }
}

.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124,58,237,0.2);
    border: 1px solid rgba(124,58,237,0.4);
    color: var(--purple2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.slide-title {
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 12px;
}

.slide-desc {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.slide-price {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 900;
}

.slide-price small { color: var(--muted); font-size: 0.8rem; font-weight: 400; }

.slide-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
}

.slide-btn {
    display: inline-block;
    background: var(--purple);
    color: var(--white) !important;
    padding: 13px 32px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 7px;
    transition: all 0.3s;
    box-shadow: 0 0 20px var(--glow);
}

.slide-btn:hover {
    background: var(--purple2);
    transform: translateY(-2px);
    box-shadow: 0 0 35px var(--glow);
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(13,13,15,0.7);
    border: 1px solid var(--border);
    color: var(--white);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.slider-arrow:hover { background: var(--purple); border-color: var(--purple); }
.slider-arrow.prev { right: 20px; }
.slider-arrow.next { left: 20px; }

.slider-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--purple2);
    width: 24px;
    border-radius: 4px;
}

/* ══════════════════════════════
   SECTION SHARED
══════════════════════════════ */
.section-wrap { padding: 50px 20px; }
.section-inner { max-width: 1300px; margin: 0 auto; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 10px;
}

.section-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 36px; height: 36px;
    background: var(--red);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
}

.see-all {
    color: var(--muted) !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.see-all:hover { color: var(--purple2) !important; border-color: rgba(124,58,237,0.4); }

/* ══════════════════════════════
   PRODUCT CARDS GRID
══════════════════════════════ */
.products-section { background: var(--bg); }
.cats-section { background: var(--bg2); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
}

@media(max-width:1100px) { .products-grid { grid-template-columns: repeat(5,1fr); } }
@media(max-width:768px)  { .products-grid { grid-template-columns: repeat(3,1fr); gap: 10px; } }
@media(max-width:480px)  { .products-grid { grid-template-columns: repeat(2,1fr); gap: 8px; } }

.product-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    border-color: rgba(124,58,237,0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(124,58,237,0.18);
}

.product-img-wrap {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #1a1a22;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.product-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
    z-index: 2;
    letter-spacing: 0.5px;
}

.badge-new     { background: var(--purple); color: #fff; }
.badge-hot     { background: var(--red);    color: #fff; }
.badge-limited { background: var(--gold);   color: #111; }

.product-info { padding: 10px; }

.product-cat {
    color: var(--purple2);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-name {
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.product-price {
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
}

.product-price small { color: var(--muted); font-size: 0.7rem; font-weight: 400; }

.order-btn {
    background: rgba(124,58,237,0.2);
    color: var(--purple2) !important;
    border: 1px solid rgba(124,58,237,0.35);
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.25s;
    white-space: nowrap;
}

.order-btn:hover {
    background: var(--purple);
    color: #fff !important;
    border-color: var(--purple);
}

/* ══════════════════════════════
   ORDER SECTION
══════════════════════════════ */
.order-section { background: var(--bg2); }

.order-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}

@media(max-width:900px) { .order-layout { grid-template-columns: 1fr; } }

.order-info-tag {
    display: inline-block;
    color: var(--purple2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.order-info-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 14px;
}

.order-info-title span { color: var(--purple2); }

.order-info-desc {
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: 32px;
    font-size: 0.92rem;
}

.steps { display: flex; flex-direction: column; gap: 18px; }

.step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.3s;
}

.step:hover { border-color: rgba(124,58,237,0.3); }

.step-num {
    width: 34px; height: 34px;
    background: rgba(124,58,237,0.2);
    border: 1px solid rgba(124,58,237,0.4);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple2);
    font-weight: 900;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.step-text strong { color: var(--white); display: block; margin-bottom: 2px; font-size: 0.9rem; }
.step-text span { color: var(--muted); font-size: 0.82rem; }

/* FORM */
.order-form-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
}

.form-card-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:480px) { .form-row2 { grid-template-columns: 1fr; } }

.fg { margin-bottom: 14px; }

.fg label {
    display: block;
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.fg input,
.fg textarea,
.fg select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--white);
    padding: 11px 13px;
    font-family: var(--font);
    font-size: 0.88rem;
    border-radius: 7px;
    direction: rtl;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    -webkit-appearance: none;
    appearance: none;
}

.fg input::placeholder, .fg textarea::placeholder { color: #444; }

.fg input:focus, .fg textarea:focus, .fg select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.fg select option { background: #1c1c24; }
.fg textarea { min-height: 85px; resize: vertical; }

.submit-btn {
    width: 100%;
    background: var(--purple);
    color: var(--white);
    border: none;
    padding: 14px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px var(--glow);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.submit-btn:hover { background: var(--purple2); transform: translateY(-2px); box-shadow: 0 0 35px var(--glow); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.form-success {
    display: none;
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.35);
    border-radius: 10px;
    color: var(--purple2);
    padding: 20px;
    text-align: center;
    font-weight: 700;
    margin-top: 14px;
    font-size: 1rem;
}

/* ── FOOTER ── */
.site-footer, .ast-small-footer {
    background: var(--bg2) !important;
    border-top: 1px solid var(--border) !important;
    color: var(--muted) !important;
    text-align: center;
    padding: 24px 20px !important;
    font-size: 0.82rem;
}
.ast-footer-copyright { color: var(--muted) !important; }
.ast-footer-copyright a { color: var(--purple2) !important; }
