/*
Theme Name: GeneratePress Child
Template: generatepress
Description: Al-Mehek Premium Custom Theme 2026 (Flawless Edition)
Author: Sumer
*/

/* ==========================================================================
   1. HIDE DEFAULT GENERATEPRESS HEADER & RESET
   ========================================================================== */
.site-header, .top-bar, .site-top-bar {
    display: none !important;
}

/* ==========================================================================
   2. MAIN HEADER WRAPPER (DESKTOP)
   ========================================================================== */
.am-header-main {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 99999;
    font-family: 'Jost', sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.am-header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
}

/* --- LOGO --- */
.am-logo {
    flex-shrink: 0;
}
.am-logo img {
    max-height: 55px; /* لوگو کا سائز یہاں سے کنٹرول ہوگا */
    width: auto;
    display: block;
}

/* ==========================================================================
   3. NAVIGATION MENU (DESKTOP)
   ========================================================================== */
.am-nav-menu {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.am-nav-list {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.am-nav-list > li {
    position: relative;
    padding: 20px 0;
}

.am-nav-list > li > a {
    color: #1a2a40;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.am-nav-list > li:hover > a {
    color: #c4a457;
}

/* Dropdown Arrow Indicator */
.am-has-dropdown > a::after {
    content: "▾";
    font-size: 12px;
}

/* --- DROPDOWN MENU --- */
.am-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #ffffff;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 6px;
    border-top: 3px solid #1a2a40; /* ڈارک بلیو ٹاپ بارڈر */
    list-style: none;
    padding: 15px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.am-nav-list > li:hover .am-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.am-dropdown li {
    padding: 0;
}

.am-dropdown li a {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 25px;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}

.am-dropdown li a:hover {
    background-color: #f8fafc;
    color: #c4a457;
    padding-left: 30px; /* ہلکا سا آگے کی طرف سلائیڈ ایفیکٹ */
}

/* ==========================================================================
   4. RIGHT ACTIONS (SEARCH & DEALS BUTTON)
   ========================================================================== */
.am-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Clean Rounded Search Bar */
.am-search-form {
    position: relative;
}

.am-search-form input {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    color: #1a2a40;
    width: 220px;
    outline: none;
    transition: all 0.3s ease;
}

.am-search-form input:focus {
    background: #ffffff;
    border-color: #c4a457;
    box-shadow: 0 0 0 3px rgba(196, 164, 87, 0.1);
}

/* Professional Deals Button (No Image, No Heavy Glow) */
.am-btn-deals {
    background-color: #1a2a40;
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.am-btn-deals:hover {
    background-color: #c4a457;
}

/* Hamburger Icon (Hidden on PC) */
.am-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: #1a2a40;
    cursor: pointer;
    padding: 5px;
}

/* ==========================================================================
   5. MOBILE RESPONSIVENESS (PERFECT FOR 70% USERS)
   ========================================================================== */
@media (max-width: 1024px) {
    .am-header-container {
        padding: 12px 15px;
    }

    /* Hide PC Navigation & Actions */
    .am-nav-menu, .am-search-form, .am-btn-deals {
        display: none;
    }

    /* Show Hamburger */
    .am-mobile-toggle {
        display: block;
    }

    /* Mobile Menu Container (Slide Down) */
    .am-nav-menu.mobile-active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid #eaeaea;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 80vh;
        overflow-y: auto;
    }

    .am-nav-menu.mobile-active .am-nav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 0;
    }

    .am-nav-list > li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .am-nav-list > li > a {
        padding: 15px 20px;
        justify-content: space-between;
        font-size: 15px;
    }

    /* Mobile Dropdown Styling */
    .am-dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid #f1f5f9;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none; /* JS will toggle this */
        background: #f8fafc;
        padding: 0;
        border-radius: 0;
    }

    /* Active state for dropdown (Controlled by JS) */
    .am-nav-list > li.open .am-dropdown {
        display: block;
    }

    .am-nav-list > li.open > a {
        color: #c4a457;
    }

    .am-dropdown li a {
        padding: 12px 20px 12px 35px;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
    }

    /* Mobile Search & Deals Button inside Menu */
    .am-mobile-actions {
        padding: 20px;
        display: flex !important;
        flex-direction: column;
        gap: 15px;
        background: #ffffff;
    }
    
    .am-mobile-actions .am-search-form input {
        width: 100%;
    }
    
    .am-mobile-actions .am-btn-deals {
        text-align: center;
        display: block;
    }
}





/*
 * Al-Mehek — Product Cards
 * GeneratePress Child Theme — style.css میں شامل کریں
 * ═══════════════════════════════════════════════════
 * PC    : 4 cards per row
 * Tablet: 2 cards per row
 * Mobile: 1 card per row (full, professional)
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Variables ────────────────────────────────── */
:root {
    --card-bg:       #ffffff;
    --card-shadow:   0 2px 16px rgba(26,39,68,0.07);
    --card-shadow-h: 0 12px 40px rgba(26,39,68,0.14);
    --card-radius:   14px;
    --gold:          #c9a84c;
    --gold-dark:     #a07828;
    --navy:          #1a2744;
    --text:          #1a2744;
    --muted:         #6b7280;
    --bg-page:       #f2f3f7;
    --amazon:        #ff9900;
    --amazon-h:      #e68900;
    --blue:          #2563eb;
    --blue-soft:     rgba(37,99,235,0.08);
    --ease:          cubic-bezier(0.4,0,0.2,1);
}

body {
    background: var(--bg-page);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
}

/* ══════════════════════════════════════════════
   GRID WRAPPER
══════════════════════════════════════════════ */
.archive .site-main,
.category .site-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    padding: 36px 20px 48px;
    max-width: 1360px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════
   CARD
══════════════════════════════════════════════ */
.archive article,
.category article {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .35s var(--ease),
                transform .35s var(--ease);
    border-top: 3px solid var(--gold);
    animation: cardIn .5s var(--ease) both;
}

/* staggered fade-in */
.archive article:nth-child(1) { animation-delay: .05s; }
.archive article:nth-child(2) { animation-delay: .10s; }
.archive article:nth-child(3) { animation-delay: .15s; }
.archive article:nth-child(4) { animation-delay: .20s; }
.archive article:nth-child(n+5) { animation-delay: .25s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.archive article:hover,
.category article:hover {
    box-shadow: var(--card-shadow-h);
    transform: translateY(-5px);
}

/* ══════════════════════════════════════════════
   IMAGE — Square crop with overlay on hover
══════════════════════════════════════════════ */
.archive article .post-image,
.category article .post-image,
.archive article .featured-image,
.category article .featured-image {
    position: relative;
    overflow: hidden;
    background: #f0f1f5;
    aspect-ratio: 1 / 1;   /* ← square */
}

.archive article img,
.category article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s var(--ease), filter .4s;
}

/* Hover zoom */
.archive article:hover img,
.category article:hover img {
    transform: scale(1.07);
    filter: brightness(1.04);
}

/* Overlay on hover */
.archive article .featured-image::after,
.category article .featured-image::after,
.archive article .post-image::after,
.category article .post-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 55%,
        rgba(26,39,68,0.22) 100%
    );
    opacity: 0;
    transition: opacity .35s var(--ease);
}

.archive article:hover .featured-image::after,
.category article:hover .featured-image::after,
.archive article:hover .post-image::after,
.category article:hover .post-image::after {
    opacity: 1;
}

/* Category badge (top-left of image) */
.archive article .cat-links,
.category article .cat-links {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.archive .cat-links a,
.category .cat-links a {
    background: var(--navy);
    color: #fff !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .8px;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   CARD BODY
══════════════════════════════════════════════ */
.archive .entry-header,
.category .entry-header {
    padding: 14px 16px 6px;
}

.archive .entry-title,
.category .entry-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive .entry-title a,
.category .entry-title a {
    color: var(--navy);
    text-decoration: none;
    transition: color .2s;
}

.archive .entry-title a:hover,
.category .entry-title a:hover {
    color: var(--gold);
}

/* Excerpt — max 2 lines */
.archive .entry-summary,
.category .entry-summary {
    padding: 6px 16px 10px;
    flex: 1;
}

.archive .entry-summary p,
.category .entry-summary p {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide meta / date */
.archive .entry-meta,
.category .entry-meta,
.archive .entry-footer,
.category .entry-footer {
    display: none;
}

/* ══════════════════════════════════════════════
   BUTTONS ROW
══════════════════════════════════════════════ */
.archive .entry-footer-btns,
.category .entry-footer-btns {
    display: flex;
    gap: 8px;
    padding: 0 14px 16px;
    margin-top: auto;
}

/* ── Amazon Button ───────────────────────────── */
.archive a.amazon-btn,
.category a.amazon-btn,
a.amazon-btn {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 12px !important;
    background: var(--amazon) !important;
    color: #111 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(255,153,0,0.28) !important;
    transition: background .2s, box-shadow .2s, transform .2s !important;
    letter-spacing: .2px;
}

.archive a.amazon-btn:hover,
.category a.amazon-btn:hover,
a.amazon-btn:hover {
    background: var(--amazon-h) !important;
    box-shadow: 0 5px 16px rgba(255,153,0,0.38) !important;
    transform: translateY(-1px);
    color: #111 !important;
}

/* ── Read More Button ────────────────────────── */
.archive a.more-link,
.category a.more-link,
a.more-link {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 12px !important;
    background: transparent !important;
    color: var(--blue) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 1.5px solid rgba(37,99,235,0.3) !important;
    text-decoration: none !important;
    transition: background .2s, border-color .2s, transform .2s !important;
    letter-spacing: .2px;
    box-shadow: none !important;
    margin: 0 !important;
}

.archive a.more-link:hover,
.category a.more-link:hover,
a.more-link:hover {
    background: var(--blue-soft) !important;
    border-color: var(--blue) !important;
    transform: translateY(-1px);
    color: var(--blue) !important;
}

/* ══════════════════════════════════════════════
   SINGLE POST — centred article view
   (Read More کھلنے پر)
══════════════════════════════════════════════ */
.single .site-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.single .entry-header {
    text-align: center;
    margin-bottom: 28px;
}

.single .entry-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
}

.single .featured-image {
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 28px;
    aspect-ratio: 16/9;
}

.single .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single .entry-content {
    font-size: 15.5px;
    line-height: 1.85;
    color: #374151;
}

.single .entry-content h2,
.single .entry-content h3 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--navy);
    margin: 28px 0 12px;
}

.single .entry-content a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .archive .site-main,
    .category .site-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 24px 16px 40px;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════════ */
@media (max-width: 600px) {
    .archive .site-main,
    .category .site-main {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 12px 36px;
    }

    /* Mobile card — horizontal layout (image left, text right) */
    .archive article,
    .category article {
        flex-direction: row;
        align-items: stretch;
        border-top: none;
        border-left: 3px solid var(--gold);
        border-radius: 12px;
    }

    .archive article .featured-image,
    .category article .featured-image,
    .archive article .post-image,
    .category article .post-image {
        width: 110px;
        min-width: 110px;
        aspect-ratio: unset;
        border-radius: 10px 0 0 10px;
    }

    .archive article img,
    .category article img {
        height: 100%;
        border-radius: 10px 0 0 10px;
    }

    /* Right side */
    .archive article .entry-header,
    .category article .entry-header,
    .archive article .entry-summary,
    .category article .entry-summary,
    .archive article .entry-footer-btns,
    .category article .entry-footer-btns {
        padding-left: 13px;
        padding-right: 13px;
    }

    .archive .entry-title,
    .category .entry-title {
        font-size: 13.5px;
        -webkit-line-clamp: 2;
    }

    .archive .entry-summary p,
    .category .entry-summary p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    /* Buttons stacked on mobile */
    .archive .entry-footer-btns,
    .category .entry-footer-btns {
        flex-direction: column;
        gap: 6px;
        padding-bottom: 13px;
    }

    .archive a.amazon-btn,
    .category a.amazon-btn,
    a.amazon-btn,
    .archive a.more-link,
    .category a.more-link,
    a.more-link {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }

    /* Single post mobile */
    .single .site-main {
        padding: 24px 16px 40px;
    }

    .single .featured-image {
        border-radius: 10px;
        aspect-ratio: 4/3;
    }
}



/* Amazon disabled (link نہ ہو تو) */
span.amazon-disabled {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 11px 10px;
    background: #ddd !important;
    color: #888 !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: not-allowed;
}
