/* --- 1. ძირითადი პარამეტრები და ფონტები --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Georgian:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4CBB8D; 
    --secondary-color: #2E8B57;
    --bg-color: #f9fbfd; 
    --white: #ffffff; 
    --text-dark: #2c3e50;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --radius: 16px; 
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; width: 100%; overflow-x: hidden; 
    font-family: 'Noto Sans Georgian', sans-serif;
    background-color: var(--bg-color); color: #333; line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; padding: 0; margin: 0; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* --- 2. საერთო სათაურები --- */
.section-title {
    font-size: 18px; font-weight: 700; color: var(--secondary-color);
    margin: 40px 0 20px; position: relative; padding-left: 15px;
}
.section-title::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px; background: var(--primary-color); border-radius: 4px;
}

/* --- 3. პროდუქტების გრიდი და ბარათები (გამოიყენება ყველგან) --- */
.product-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* ოდნავ გავზარდეთ ოპტიმალური ზომისთვის */
    gap: 25px; 
    margin-top: 20px;
}

.product-card {
    background: var(--white); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow);
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    transition: var(--transition); 
    height: 100%; 
    position: relative; 
    border: 1px solid transparent;
    overflow: hidden;
}

.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); 
    border-color: var(--primary-color);
}

.product-card img { 
    width: 100%; 
    height: 180px; 
    object-fit: contain; 
    margin-bottom: 15px; 
}

/* პროდუქტის სათაური */
.product-title {
    font-size: 16px; font-weight: 700; color: var(--text-dark); 
    margin-bottom: 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; height: 44px;
}
.product-title.full-text { height: auto; min-height: 44px; -webkit-line-clamp: unset; }

.product-specs {
    font-size: 13px; color: #777; margin-bottom: 10px; font-weight: 500; height: 38px;
    overflow: hidden; line-height: 1.4; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ფასის ბლოკი */
.price-box { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    margin-top: auto; 
    padding-top: 10px;
}
.old-price { text-decoration: line-through; color: #999; font-size: 14px; }
.current-price { color: var(--primary-color); font-weight: bold; font-size: 18px; }
.current-price.discounted { color: #E74C3C; }

/* --- 4. ბეიჯები და ტაიმერები --- */
.card-badge {
    position: absolute; top: 15px; left: 15px; padding: 6px 14px;
    border-radius: 8px; color: #fff; font-size: 13px; font-weight: 800; 
    text-transform: uppercase; z-index: 5; letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.badge-sale { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%); }
.badge-promo { background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%); }
.badge-new { background: linear-gradient(135deg, #4CBB8D 0%, #11998e 100%); }

/* ტაიმერის ბეიჯი */
.timer-badge {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    margin: -10px auto 12px auto; padding: 6px 18px; border-radius: 50px;
    background: linear-gradient(135deg, #ff9a44 0%, #fc6076 100%); color: #fff; 
    font-size: 12px; font-weight: 700; z-index: 6; width: fit-content;
    box-shadow: 0 5px 15px rgba(252, 96, 118, 0.3);
}

/* --- 5. FAQ სექცია (გლობალური) --- */
.faq-container, .faq-section { max-width: 900px; margin: 60px auto; padding: 0 20px; }

.faq-title {
    font-size: 22px; font-weight: 800; color: var(--text-dark);
    margin-bottom: 25px; border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px; display: inline-block;
}

.faq-box {
    background: #fff; border: 1px solid #edf2f7; border-radius: 12px;
    margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow: hidden; transition: var(--transition);
}
.faq-box:hover { border-color: var(--primary-color); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.faq-box summary {
    padding: 18px 20px; cursor: pointer; font-weight: 600; color: #2d3748;
    display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.faq-box summary::-webkit-details-marker { display: none; }

.faq-box[open] summary { background: #e8f8f1; color: var(--secondary-color); }

.faq-icon { color: var(--primary-color); transition: transform 0.3s ease; }
.faq-box[open] .faq-icon { transform: rotate(45deg); color: #E74C3C; }

.faq-a { padding: 15px 20px; color: #555; font-size: 14px; background: #fff; line-height: 1.6; }

/* --- 6. მობილური ადაპტაცია --- */
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .product-card { padding: 12px; }
    .product-card img { height: 140px; }
    .product-title { font-size: 14px; height: 40px; }
    .current-price { font-size: 16px; }
    .card-badge { padding: 4px 10px; font-size: 11px; top: 10px; left: 10px; }
}

/* ძიების თითოეული ელემენტი */
.ls-item {
    display: flex !important;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.3s ease; /* რბილი გადასვლა ყველაფერზე */
}

/* ჰოვერ ეფექტი */
.ls-item:hover {
    background-color: #f0fdf4 !important; /* ნაზი მწვანე ფონი */
    padding-left: 20px; /* ოდნავ მარჯვნივ გაწევა */
}

/* სურათის კონტეინერი */
.ls-img-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

/* სურათის ჰოვერი */
.ls-item:hover .ls-img-box {
    transform: scale(1.1); /* სურათის ოდნავ გადიდება */
    border-color: #4CBB8D;
}

.ls-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ინფორმაციის ბლოკი */
.ls-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ls-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* ჰოვერზე სათაურის ფერის შეცვლა */
.ls-item:hover .ls-name {
    color: #2E8B57;
}

.ls-price {
    color: #4CBB8D;
    font-weight: 800;
    font-size: 13px;
    margin-top: 2px;
}

/* "ყველა შედეგის ნახვა" ღილაკი */
.ls-all-results {
    display: block;
    padding: 14px;
    text-align: center;
    background: #f8fafc;
    font-weight: bold;
    color: #2E8B57;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.ls-all-results:hover {
    background: #2E8B57;
    color: #ffffff;
}

.ls-not-found {
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

/* ბანერის კოდი -------------------------------------------------- */
    :root {
        --pb-green: #4CBB8D;
        --pb-dark-green: #1a3a2a;
        --pb-gold: #fbbf24;
    }

    .promo-banner-wrapper { 
        padding: 25px 40px; 
        min-height: 110px;  
        border-radius: 20px;
        text-align: center; 
        position: relative; 
        z-index: 1; 
        margin: 15px 0;
        font-family: 'Noto Sans Georgian', sans-serif; 
        display: flex; 
        flex-wrap: wrap; 
        justify-content: center; 
        align-items: center; 
        gap: 40px;
        animation: slideDown 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

    @keyframes slideDown {
        from { transform: translateY(-100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .pb-badge { 
        padding: 10px 22px; 
        border-radius: 50px; 
        font-weight: 900; 
        font-size: 25px; 
        text-transform: uppercase;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        letter-spacing: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pb-content { text-align: left; max-width: 450px; }
    
    /* 🔴 შეცვლილია h4-ის კლასით */
    .pb-content .pb-title { 
        margin: 0; 
        font-size: 22px; 
        font-weight: 800; 
        line-height: 1.1; 
    }
    .pb-content p { 
        margin: 6px 0 0; 
        font-size: 16px; 
        opacity: 0.95; 
    }

    .pb-timer { display: flex; gap: 12px; }
    .pb-time-box { 
        background: rgba(0,0,0,0.15); 
        padding: 10px 14px;
        border-radius: 12px; 
        min-width: 60px; 
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.15);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .pb-time-box span { display: block; font-size: 24px; font-weight: 800; line-height: 1; }
    .pb-time-box small { font-size: 10px; text-transform: uppercase; margin-top: 5px; font-weight: 700; }

    .pb-btn { 
        text-decoration: none; 
        padding: 14px 32px;
        border-radius: 50px; 
        font-weight: 800; 
        font-size: 15px;
        transition: all 0.3s ease;
        box-shadow: 0 6px 15px rgba(0,0,0,0.2);
        text-transform: uppercase;
    }
    .pb-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.25); }


    /* ✅ ადმინკიდან მართვადი 7 თემა */

    /* თემა 1: Flash Sale (წითელი) */
    .pb-theme-1 { background: #ef4444; color: #fff; }
    .pb-theme-1 .pb-badge { background: #fff; color: #ef4444; }
    .pb-theme-1 .pb-btn { background: #fff; color: #ef4444; }

    /* თემა 2: Premium (მუქი) */
    .pb-theme-2 { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: var(--pb-gold); border-bottom: 4px solid var(--pb-gold); }
    .pb-theme-2 .pb-badge { background: var(--pb-gold); color: #0f172a; }
    .pb-theme-2 .pb-time-box { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(251, 191, 36, 0.4); }
    .pb-theme-2 .pb-content h4 { color: #fff; }
    .pb-theme-2 .pb-btn { background: var(--pb-gold); color: #0f172a; }

    /* თემა 3: Info Bar (ლურჯი) */
    .pb-theme-3 { background: #0ea5e9; color: #fff; }
    .pb-theme-3 .pb-badge { background: #fff; color: #0ea5e9; }
    .pb-theme-3 .pb-btn { background: #fff; color: #0ea5e9; }

    /* თემა 4: Festive (ფერადი) */
    .pb-theme-4 { background: linear-gradient(90deg, #d946ef, #8b5cf6); color: #fff; }
    .pb-theme-4 .pb-badge { background: #fff; color: #c026d3; }
    .pb-theme-4 .pb-btn { background: #fff; color: #8b5cf6; }

    /* თემა 5: Eco (მწვანე) */
    .pb-theme-5 { background: var(--pb-green); color: #fff; }
    .pb-theme-5 .pb-badge { background: #fff; color: var(--pb-green); }
    .pb-theme-5 .pb-btn { background: #fff; color: var(--pb-green); }

    /* თემა 6: Alert (ნარინჯისფერი) */
    .pb-theme-6 { background: #ea580c; color: #fff; }
    .pb-theme-6 .pb-badge { background: #fff; color: #ea580c; }
    .pb-theme-6 .pb-btn { background: #fff; color: #ea580c; }

    /* თემა 7: Minimal (ღია) */
    .pb-theme-7 { background: #f8fafc; color: #0f172a; border: 1px solid #cbd5e1; }
    .pb-theme-7 .pb-badge { background: #0f172a; color: #fff; }
    .pb-theme-7 .pb-time-box { background: #e2e8f0; color: #0f172a; border-color: #cbd5e1; }
    .pb-theme-7 .pb-btn { background: #0f172a; color: #fff; }

    /* მობილურის ოპტიმიზაცია */
    @media (max-width: 768px) { 
        .promo-banner-wrapper { padding: 20px 10px; flex-direction: column; gap: 15px; min-height: auto; } 
        .pb-badge { font-size: 18px; padding: 8px 16px; min-width: 60px; }
        .pb-content { text-align: center; }
        .pb-content h4 { font-size: 18px; }
        .pb-timer { gap: 8px; justify-content: center; width: 100%; }
        .pb-time-box { min-width: 50px; padding: 6px 4px; }
        .pb-time-box span { font-size: 18px; }
        .pb-btn { padding: 10px 24px; font-size: 13px; }
    }

    @media (max-width: 350px) {
        .pb-timer { gap: 4px; }
        .pb-time-box { min-width: 45px; }
        .pb-time-box span { font-size: 16px; }
    }


 /* ================================================================
   BLOG COMPONENTS (უნივერსალური ბლოგის მოდული ყველა გვერდისთვის)
   ================================================================ */

/* 1. ბლოგების მთავარი გვერდის ჰედერი (blog.php-სთვის) */
.blog-list-header {
    text-align: center;
    padding: 40px 20px;
    background: #f9fbfd;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 1px solid #f0f5f2;
}

.blog-list-header h1 {
    color: var(--brand-green, #2E8B57);
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 800;
}

.blog-list-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 2. ბადე (Grid) ბლოგებისთვის */
.blog-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px; 
    margin-bottom: 50px;
}

/* 3. უნივერსალური ბლოგის ბარათი */
.blog-card {
    background: #ffffff; 
    border-radius: 14px; 
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04); 
    text-decoration: none !important; 
    color: inherit;
    display: flex; 
    flex-direction: column; 
    border: 1px solid #f0f5f2; 
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 12px 25px rgba(76, 187, 141, 0.1); 
    border-color: #e8f5e9;
}

.blog-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    background: #f9f9f9; 
    transition: transform 0.5s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-card-content { 
    padding: 20px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
}

.blog-date { 
    font-size: 12px; 
    color: #999; 
    font-weight: 600; 
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* 🛑 H3 შეიცვალა .blog-card-title კლასით 🛑 */
.blog-card-content .blog-card-title { 
    font-size: 18px; 
    font-weight: 700;
    margin: 0 0 10px 0; 
    color: #2c3e50; 
    line-height: 1.4; 
    transition: color 0.3s;
}

/* 🛑 ჰოვერზე ფერის შეცვლა 🛑 */
.blog-card:hover .blog-card-title {
    color: var(--brand-green, #4CBB8D);
}

.blog-card-content p { 
    font-size: 14px; 
    color: #666; 
    line-height: 1.6; 
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* ჭრის ტექსტს მე-3 ხაზზე */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* წაიკითხე სრულად (Read More) ღილაკი ბარათის ბოლოს */
.blog-read-more {
    margin-top: auto;
    color: var(--brand-green, #4CBB8D);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.blog-card:hover .blog-read-more {
    gap: 8px; /* ისარი ოდნავ მარჯვნივ იწევა ჰოვერზე */
}

/* ================================================================
   უნივერსალური პაგინაცია (გვერდების გადასართავი)
   ================================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 40px 0;
    flex-wrap: wrap; 
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #ffffff;
    color: #2c3e50;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: var(--brand-green, #4CBB8D);
    color: var(--brand-green, #4CBB8D);
    transform: translateY(-2px);
}

.pagination a.active {
    background: var(--brand-green, #4CBB8D);
    color: #ffffff;
    border-color: var(--brand-green, #4CBB8D);
    pointer-events: none;
}

.pagination span {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 15px; /* წერტილებს მცირე ადგილი ჭირდებათ */
}

/* 📱 მობილურის ვერსია */
@media (max-width: 480px) {
    .pagination {
        gap: 4px;
    }
    .pagination a {
        width: 32px;  /* ზუსტი კვადრატი მობილურისთვის */
        height: 32px;
        font-size: 13px;
        border-radius: 6px;
    }
    .pagination span {
        width: 12px;
    }
}

/* =========================================
   უნივერსალური Breadcrumbs (პურის ნამცეცები)
   ========================================= */
.breadcrumb {
    padding: 0;
    margin: 20px 5px 0 5px; /* მცირე დაშორება კიდეებიდან */
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px; /* დაშორება ელემენტებს შორის */
    
    /* 📱 ჰორიზონტალური სქროლის მაგია მობილურისთვის */
    flex-wrap: nowrap; 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; /* Firefox-სთვის */
    -ms-overflow-style: none; /* IE-სთვის */
    
    font-size: 13px;
    color: #64748b; /* ელეგანტური ნაცრისფერი */
}

/* ვმალავთ სქროლბარს Chrome/Safari-ში */
.breadcrumb::-webkit-scrollbar { 
    display: none; 
}

.breadcrumb li { 
    display: flex;
    align-items: center;
    flex-shrink: 0; /* იცავს შეკუმშვისგან */
}

.breadcrumb li a { 
    color: #64748b; 
    text-decoration: none; 
    transition: color 0.2s ease; 
}

.breadcrumb li a:hover { 
    color: var(--brand-green, #4CBB8D); 
}

/* გამყოფი ისარი (>) */
.breadcrumb li .bc-separator { 
    font-size: 10px; 
    margin: 0 0 0 8px; /* დაშორება მხოლოდ მარცხნივ, რადგან gap უკვე გვაქვს */
    color: #cbd5e1; 
}

/* ბოლო (აქტიური) გვერდი */
.breadcrumb li.bc-current { 
    color: #0f172a; /* მუქი ფერი */
    font-weight: 600; 
}