/* ==========================================================================
   PHASE 5 FIX - Allfood frontend fallback styles
   These styles make the frontend display correctly even if Bootstrap CDN
   or the external local CSS file is not loaded by the browser.
   ========================================================================== */

.container{width:100%;max-width:var(--af-content-max,1200px);margin-right:auto;margin-left:auto;padding-right:var(--af-page-pad-desktop,16px);padding-left:var(--af-page-pad-desktop,16px)}
.row{display:flex;flex-wrap:wrap;margin-right:-12px;margin-left:-12px}
.row>*{padding-right:12px;padding-left:12px}
.g-3{gap:0}.g-4{gap:0}
.col-6{width:50%}.col-12{width:100%}
.d-flex{display:flex}.d-none{display:none}.align-items-center{align-items:center}.justify-content-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:1rem}
.text-muted{color:var(--af-muted)!important}.text-warning{color:var(--af-yellow)!important}.text-success{color:#16a34a!important}
.mb-0{margin-bottom:0!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mt-3{margin-top:1rem!important}.mt-5{margin-top:3rem!important}
.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}
.h3{font-size:1.75rem}.h4{font-size:1.5rem}.h5{font-size:1.25rem}.fw-bold{font-weight:900!important}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.6rem 1rem;border-radius:.35rem;border:1px solid transparent;text-decoration:none;cursor:pointer;font-weight:800}
.btn-sm{padding:.35rem .7rem;font-size:.85rem}.btn-lg{padding:.8rem 1.2rem;font-size:1.05rem}
.btn-dark{background:#111827;color:#fff;border-color:#111827}.btn-light{background:#fff;color:#111827;border-color:#fff}
.btn-outline-secondary{background:#fff;color:#475569;border-color:#cbd5e1}.btn-outline-primary{background:#fff;color:var(--af-blue-dark);border-color:var(--af-blue-dark)}
.form-control,.form-select{display:block;width:100%;min-height:42px;padding:.55rem .75rem;border:1px solid var(--af-line);border-radius:.5rem;background:#fff;color:var(--af-ink)}
.form-label{display:block;margin-bottom:.35rem}
.table{width:100%;border-collapse:collapse}.table th,.table td{padding:.75rem;border-bottom:1px solid var(--af-line)}
.badge{display:inline-flex;align-items:center;padding:.25rem .55rem;border-radius:.4rem;font-size:.75rem;font-weight:900}
.text-bg-success{background:#16a34a;color:#fff}.text-bg-warning{background:#f59e0b;color:#111}.text-bg-danger{background:#dc2626;color:#fff}.text-bg-primary{background:var(--af-blue-dark);color:#fff}.text-bg-secondary{background:#64748b;color:#fff}
.dropdown-menu{display:none;position:absolute;background:#fff;border:1px solid var(--af-line);min-width:220px;padding:8px 0;box-shadow:var(--af-shadow);z-index:1000}.dropdown:hover .dropdown-menu{display:block}.dropdown-item{display:block;padding:8px 14px!important;min-height:auto!important}
@media(min-width:768px){.col-md-3{width:25%}.col-md-4{width:33.333%}.col-md-5{width:41.666%}.col-md-6{width:50%}.d-md-inline{display:inline!important}.d-md-flex{display:flex!important}}
@media(min-width:992px){.col-lg-2{width:16.666%}.col-lg-3{width:25%}.col-lg-4{width:33.333%}.col-lg-5{width:41.666%}.col-lg-6{width:50%}.col-lg-7{width:58.333%}.col-lg-8{width:66.666%}.d-lg-flex{display:flex!important}}

:root{
    --af-blue:#67B7E4;
    --af-blue-dark:#2b8fca;
    --af-blue-soft:#eef8ff;
    --af-orange:#F25C2E;
    --af-orange-soft:#fff1eb;
    --af-yellow:#f7bd2b;
    --af-ink:#1e293b;
    --af-muted:#64748b;
    --af-line:#edf1f5;
    --af-bg:#ffffff;
    --af-soft:#f8fafc;
    --af-card:#ffffff;
    --af-shadow:0 14px 34px rgba(15,23,42,.07);
}
*{box-sizing:border-box}
body{
    font-family:var(--af-font-family,"Cairo",system-ui,-apple-system,"Segoe UI",Arial,sans-serif);
    background:#fff;
    color:var(--af-ink);
}
a{text-decoration:none;color:inherit}
img{max-width:100%}
.btn-primary{
    background:var(--af-blue-dark);
    border-color:var(--af-blue-dark);
}
.btn-primary:hover{
    background:#1f7fb4;
    border-color:#1f7fb4;
}
.btn-orange{
    background:var(--af-orange);
    border-color:var(--af-orange);
    color:#fff;
}
.btn-orange:hover{
    background:#df4f25;
    border-color:#df4f25;
    color:#fff;
}

/* Header */
.af-header{
    background:#fff;
    border-bottom:1px solid var(--af-line);
    position:sticky;
    top:0;
    z-index:1020;
    box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.af-topbar{
    background:#fbfdff;
    border-bottom:1px solid var(--af-line);
    font-size:13px;
    color:var(--af-muted);
}
.af-topbar-inner{
    min-height:36px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
}
.af-topbar a{color:var(--af-blue-dark);font-weight:800}
.af-mainbar{
    min-height:82px;
    display:flex;
    align-items:center;
    gap:24px;
}
.af-logo img{
    width:168px;
    height:auto;
    display:block;
}
.af-search{
    flex:1;
    display:flex;
    align-items:center;
    border:1px solid var(--af-line);
    background:#f9fbfd;
    border-radius:999px;
    overflow:hidden;
    min-height:46px;
    max-width:680px;
}
.af-search-cat{
    width:150px;
    border:0;
    background:#fff;
    padding:0 16px;
    min-height:46px;
    font-size:13px;
    color:var(--af-ink);
    border-right:1px solid var(--af-line);
    outline:0;
}
.af-search input{
    flex:1;
    border:0;
    outline:0;
    background:transparent;
    padding:0 16px;
    min-height:46px;
    font-size:14px;
}
.af-search button{
    width:54px;
    min-height:46px;
    border:0;
    background:transparent;
    color:var(--af-ink);
}
.af-actions{
    display:flex;
    align-items:center;
    gap:12px;
}
.af-action{
    position:relative;
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--af-ink);
    font-weight:800;
    font-size:13px;
}
.af-action i{font-size:19px}
.af-cart b,
.af-mobile-cart span{
    position:absolute;
    top:-9px;
    right:-10px;
    min-width:20px;
    height:20px;
    border-radius:999px;
    background:var(--af-orange);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
}
.af-mobile-toggle{
    display:none;
    width:42px;
    height:42px;
    border:1px solid var(--af-line);
    border-radius:12px;
    background:#fff;
}
.af-nav{
    border-top:1px solid var(--af-line);
}
.af-menu{
    display:flex;
    align-items:center;
    gap:8px;
    list-style:none;
    margin:0;
    padding:0;
}
.af-menu a{
    display:flex;
    align-items:center;
    gap:6px;
    min-height:45px;
    padding:0 14px;
    font-size:13px;
    font-weight:800;
    color:#334155;
    border-radius:3px;
}
.af-menu a.active,
.af-menu a:hover{
    background:var(--af-yellow);
    color:#111827;
}
.af-coupon-link{
    font-size:13px;
    color:#334155;
    font-weight:800;
}

/* Hero */
.af-section{padding:34px 0}
.af-hero-grid{
    display:grid;
    grid-template-columns:1.65fr .85fr;
    gap:24px;
    align-items:stretch;
}
.af-hero-main{
    min-height:330px;
    border-radius:4px;
    background:
        radial-gradient(circle at 75% 48%, rgba(255,255,255,.45), transparent 28%),
        linear-gradient(135deg,#eaf7ff,#dff2fb);
    position:relative;
    overflow:hidden;
    padding:54px 60px;
    display:flex;
    align-items:center;
}
.af-hero-content{max-width:430px;position:relative;z-index:2}
.af-kicker{
    color:var(--af-orange);
    font-weight:900;
    font-size:13px;
    margin-bottom:12px;
}
.af-hero-main h1{
    font-size:44px;
    line-height:1.08;
    font-weight:900;
    margin:0 0 14px;
    letter-spacing:-1.2px;
}
.af-hero-main p{
    color:var(--af-muted);
    margin-bottom:24px;
}
.af-hero-main .btn{
    border-radius:0;
    padding:11px 22px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.4px;
    font-size:12px;
}
.af-hero-visual{
    position:absolute;
    right:5%;
    bottom:0;
    width:42%;
    height:90%;
    background:
        radial-gradient(ellipse at center, rgba(242,92,46,.20), transparent 52%),
        linear-gradient(25deg, transparent 0 45%, rgba(242,92,46,.06) 45% 55%, transparent 55%);
}
.af-hero-visual::after{
    content:"";
    position:absolute;
    inset:20px 8% 0;
    background:
        radial-gradient(circle at 50% 18%, var(--af-orange) 0 10%, transparent 11%),
        linear-gradient(90deg, var(--af-orange), #ffad65);
    clip-path:polygon(38% 4%,62% 4%,72% 100%,28% 100%);
    transform:rotate(-10deg);
    border-radius:22px;
    opacity:.92;
}
.af-side-offers{
    display:grid;
    gap:18px;
}
.af-side-card{
    min-height:155px;
    border-radius:4px;
    background:linear-gradient(135deg,#f4faef,#fff);
    padding:30px;
    position:relative;
    overflow:hidden;
}
.af-side-card:nth-child(2){background:linear-gradient(135deg,#fff3e7,#fff)}
.af-side-card h3{
    font-size:24px;
    font-weight:900;
    margin:0 0 6px;
}
.af-side-card p{margin:0;color:var(--af-muted);font-size:13px}
.af-discount{color:var(--af-orange);font-weight:900;font-size:18px}

/* Section headers */
.af-section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
}
.af-section-head h2{
    margin:0;
    font-size:24px;
    font-weight:900;
}
.af-view-link{
    color:var(--af-muted);
    font-size:13px;
    font-weight:800;
}
.af-arrows{
    display:inline-flex;
    gap:6px;
    margin-left:10px;
}
.af-arrow{
    width:26px;
    height:26px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#f4f6f8;
    color:#6b7280;
    font-size:12px;
}
.af-arrow.next{background:var(--af-yellow);color:#111}

/* Categories */
.af-category-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:18px;
}
.af-category-card{
    min-height:130px;
    padding:24px 14px;
    border:1px solid var(--af-line);
    background:#fff;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    box-shadow:0 14px 30px rgba(15,23,42,.04);
    transition:.18s ease;
}
.af-category-card:hover{
    transform:translateY(-4px);
    box-shadow:0 18px 34px rgba(15,23,42,.08);
}
.af-category-icon{
    width:42px;
    height:42px;
    object-fit:contain;
}
.af-category-card span{
    font-size:14px;
    font-weight:800;
    text-align:center;
}

/* Brand strip */
.af-brand-strip{
    display:grid;
    grid-template-columns:repeat(4, minmax(0,1fr));
    gap:20px;
}
.af-brand-card{
    display:grid;
    grid-template-columns:96px 1fr;
    gap:14px;
    align-items:center;
    background:#fff;
    border:1px solid var(--af-line);
    padding:14px;
}
.af-brand-card img{
    width:96px;
    height:58px;
    object-fit:contain;
    background:#f7f8fa;
}
.af-brand-card strong{
    display:block;
    font-size:14px;
    line-height:1.25;
}
.af-brand-card small{
    color:var(--af-muted);
}

/* Products */
.af-product-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:18px;
}
.af-product-card{
    position:relative;
    height:100%;
    background:#fff;
    border:1px solid var(--af-line);
    box-shadow:0 12px 28px rgba(15,23,42,.04);
    transition:.18s ease;
}
.af-product-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--af-shadow);
}
.af-product-badges{
    position:absolute;
    top:10px;
    left:10px;
    z-index:4;
    display:flex;
    gap:5px;
}
.af-badge{
    display:inline-flex;
    min-height:20px;
    align-items:center;
    padding:0 7px;
    border-radius:0;
    font-size:10px;
    font-weight:900;
}
.af-badge.sale{background:#83c441;color:#fff}
.af-badge.new{background:var(--af-orange);color:#fff}
.af-wishlist{
    position:absolute;
    top:10px;
    right:10px;
    z-index:4;
    border:0;
    background:transparent;
    color:#94a3b8;
}
.af-product-image{
    display:flex;
    align-items:center;
    justify-content:center;
    height:190px;
    padding:22px;
    background:#fff;
}
.af-product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    transition:.2s ease;
}
.af-product-card:hover .af-product-image img{
    transform:scale(1.04);
}
.af-product-body{padding:14px}
.af-product-title{
    display:block;
    min-height:42px;
    color:var(--af-ink);
    font-size:14px;
    line-height:1.35;
    font-weight:800;
}
.af-product-meta{
    color:var(--af-muted);
    font-size:12px;
    min-height:19px;
}
.af-product-rating{
    color:#f6b100;
    font-size:11px;
    letter-spacing:1px;
    margin:4px 0;
}
.af-price-row{
    display:flex;
    align-items:center;
    gap:8px;
}
.af-price-row strong{
    color:var(--af-orange);
    font-size:16px;
    font-weight:900;
}
.af-price-row span{
    color:#94a3b8;
    text-decoration:line-through;
    font-size:12px;
}
.af-stock{
    color:#16a34a;
    font-size:11px;
    font-weight:800;
    margin:4px 0 10px;
}
.af-stock.low{color:var(--af-orange)}
.af-cart-row{
    display:grid;
    grid-template-columns:76px 1fr;
    gap:8px;
    align-items:center;
}
.af-qty-mini{
    display:grid;
    grid-template-columns:22px 1fr 22px;
    border:1px solid var(--af-line);
    min-height:32px;
}
.af-qty-mini button{
    border:0;
    background:#fff;
    color:#64748b;
    font-weight:900;
}
.af-qty-mini input{
    width:100%;
    border:0;
    text-align:center;
    font-size:12px;
    outline:0;
}
.af-add-btn{
    min-height:32px;
    border:0;
    background:#fff;
    color:var(--af-ink);
    font-size:11px;
    font-weight:900;
}
.af-add-btn:hover{color:var(--af-orange)}
.af-min-note{
    margin-top:8px;
    font-size:11px;
    color:var(--af-muted);
}

/* Register promo */
.af-register-band{
    background:linear-gradient(135deg,#eef8ff,#f6fbff);
    padding:54px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:36px;
    align-items:center;
}
.af-register-band h2{
    font-size:34px;
    line-height:1.15;
    font-weight:900;
    margin:0 0 12px;
}
.af-register-band h2 span{color:var(--af-orange)}
.af-register-band p{color:var(--af-muted)}
.af-register-form{
    display:grid;
    gap:10px;
}
.af-register-form input{
    height:40px;
    border:0;
    background:#fff;
    padding:0 14px;
}
.af-register-form button{
    height:42px;
    border:0;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
}

/* Blog cards */
.af-blog-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:28px;
}
.af-blog-card{
    background:#fff;
}
.af-blog-card .img{
    height:165px;
    background:#f4f7fa;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:54px;
}
.af-blog-card h3{
    margin:14px 0 8px;
    font-size:17px;
    font-weight:900;
}
.af-blog-card p{
    color:var(--af-muted);
    font-size:13px;
}

/* Old compatibility */
.hero,.category-card,.product-card,.info-card{
    background:#fff;
    border:1px solid var(--af-line);
    box-shadow:var(--af-shadow);
}
.info-card{border-radius:18px}
.product-img{height:190px;width:100%;object-fit:contain;background:#fff;padding:18px}
.price{font-size:1.2rem;font-weight:800;color:var(--af-orange)}
.old-price{text-decoration:line-through;color:#8a94a6;font-size:.9rem}
.offer-badge{background:var(--af-orange);color:#fff}
.search-box{max-width:560px;width:100%}

/* Footer */
.af-footer{
    margin-top:60px;
    background:#101828;
    color:#fff;
    padding:54px 0 24px;
}
.af-footer-logo{
    width:145px;
    filter:brightness(1.1);
}
.af-footer p{color:rgba(255,255,255,.68)}
.af-footer h6{
    font-weight:900;
    margin-bottom:14px;
}
.af-footer a{
    display:block;
    color:rgba(255,255,255,.7);
    margin:7px 0;
}
.af-footer a:hover{color:#fff}
.af-footer-bottom{
    border-top:1px solid rgba(255,255,255,.1);
    margin-top:34px;
    padding-top:20px;
    color:rgba(255,255,255,.55);
    font-size:13px;
}
.footer-link{display:block;color:rgba(255,255,255,.72);text-decoration:none;margin:.35rem 0}
.footer-link:hover{color:#fff}

.af-mobile-cart{
    display:none;
    position:fixed;
    right:18px;
    bottom:18px;
    width:54px;
    height:54px;
    border-radius:50%;
    background:var(--af-orange);
    color:#fff;
    align-items:center;
    justify-content:center;
    z-index:1000;
    box-shadow:0 14px 30px rgba(242,92,46,.28);
}
.af-mobile-cart i{font-size:22px}

/* Responsive */
@media(max-width:1199px){
    .af-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    .af-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .af-brand-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:991px){
    .af-mainbar{min-height:72px;gap:14px}
    .af-logo img{width:138px}
    .af-search{order:3;width:100%;max-width:none;flex-basis:100%}
    .af-actions{margin-left:auto}
    .af-mobile-toggle{display:inline-flex;align-items:center;justify-content:center}
    .af-nav{padding:8px 0}
    .af-menu{display:block}
    .af-menu a{justify-content:flex-start}
    .af-coupon-link{display:block;padding:10px 14px}
    .af-hero-grid{grid-template-columns:1fr}
    .af-hero-main{padding:38px 26px}
    .af-hero-main h1{font-size:34px}
    .af-hero-visual{opacity:.45}
    .af-register-band{grid-template-columns:1fr;padding:34px 24px}
}
@media(max-width:767px){
    .af-topbar{display:none}
    .af-actions .af-action span{display:none}
    .af-search-cat{display:none}
    .af-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .af-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
    .af-brand-strip{grid-template-columns:1fr}
    .af-blog-grid{grid-template-columns:1fr}
    .af-section{padding:24px 0}
    .af-hero-main{min-height:280px}
    .af-hero-main h1{font-size:30px}
    .af-product-image{height:150px}
    .af-product-title{font-size:13px}
    .af-cart-row{grid-template-columns:1fr}
    .af-mobile-cart{display:flex}
}

