/*
Theme Name: Chef Ammar WooCommerce Store
Theme URI: https://chefammar.kretivco.com
Author: Kretivco
Description: Mobile-first Chef Ammar storefront recreated as a native WooCommerce theme.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: chef-ammar-woo
*/

:root{
  --ca-bg:#ffffff;
  --ca-surface:#ffffff;
  --ca-soft:#f7f7f5;
  --ca-soft-2:#f1f3ef;
  --ca-text:#1c1c1c;
  --ca-muted:#777a77;
  --ca-line:#e9e9e6;
  --ca-green:#157a43;
  --ca-green-dark:#0f6034;
  --ca-green-soft:#dff7e8;
  --ca-maroon:#9f1f28;
  --ca-red:#a71922;
  --ca-shadow:0 16px 42px rgba(24,24,24,.11);
  --ca-radius:18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--ca-bg);
  color:var(--ca-text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
body.ca-modal-open{overflow:hidden}
button,input,select,textarea{font:inherit}
button{ -webkit-tap-highlight-color:transparent; }
a{color:inherit}
img{display:block;max-width:100%;height:auto}
.ca-page{width:100%;max-width:980px;margin:0 auto;background:#fff;min-height:100vh}

/* STORE HEADER */
.ca-store{position:relative;overflow:hidden;background:#fff;border-bottom:1px solid var(--ca-line)}
.ca-store-cover{position:relative;height:260px;overflow:hidden;background:#9d1c25}
.ca-store-cover img{width:100%;height:100%;object-fit:cover;object-position:center}
.ca-store-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.04),rgba(0,0,0,.28))}
.ca-floating-btn{
  position:absolute;top:18px;z-index:3;width:46px;height:46px;padding:0;border:0;border-radius:50%;
  background:#fff;color:#111;display:grid;place-items:center;box-shadow:0 4px 16px rgba(0,0,0,.12);cursor:pointer
}
.ca-floating-btn svg{width:23px;height:23px}
.ca-floating-btn.ca-back{left:18px}
.ca-floating-btn.ca-share{right:18px}
.ca-store-info{padding:22px 24px 18px}
.ca-store-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.ca-store h1{margin:0;font-size:29px;line-height:1.15;letter-spacing:-.035em;font-weight:800}
.ca-store-tag{
  flex:0 0 auto;padding:7px 10px;border-radius:999px;background:var(--ca-green-soft);color:var(--ca-green-dark);
  font-size:11px;font-weight:800
}
.ca-store-copy{margin:9px 0 0;max-width:650px;color:var(--ca-muted);font-size:13px;line-height:1.55}
.ca-store-meta{
  display:flex;gap:18px;margin-top:15px;padding-top:15px;border-top:1px solid var(--ca-line);color:#4c4e4c;font-size:12px
}
.ca-store-meta span{display:inline-flex;align-items:center;gap:6px}
.ca-store-meta strong{color:#1e1f1e}

/* FILTER CHIPS */
.ca-chips{
  position:sticky;top:0;z-index:30;display:flex;gap:9px;overflow-x:auto;padding:12px 18px;
  background:rgba(255,255,255,.96);border-bottom:1px solid var(--ca-line);scrollbar-width:none;backdrop-filter:blur(10px)
}
.ca-chips::-webkit-scrollbar{display:none}
.ca-chip{
  flex:0 0 auto;border:1px solid #dedfdb;background:#fff;color:#353735;padding:9px 13px;border-radius:999px;
  font-size:12px;font-weight:700;cursor:pointer
}
.ca-chip.ca-active{background:#1e1f1e;color:#fff;border-color:#1e1f1e}

/* PRODUCT GRID */
.ca-menu{padding:27px 24px 110px}
.ca-menu-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}
.ca-menu-head h2{margin:0;font-size:26px;line-height:1.15;letter-spacing:-.03em}
.ca-menu-head p{margin:0;color:var(--ca-muted);font-size:12px}
.ca-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 18px}
.ca-card{min-width:0;cursor:pointer}
.ca-card[hidden]{display:none!important}
.ca-card-media{position:relative;aspect-ratio:1/.9;overflow:hidden;border-radius:16px;background:#eee}
.ca-card-media img{width:100%;height:100%;object-fit:cover;transition:transform .28s ease}
.ca-card:hover .ca-card-media img{transform:scale(1.025)}
.ca-add-circle{
  position:absolute;right:10px;top:10px;width:42px;height:42px;border:0;border-radius:50%;background:var(--ca-green);
  color:#fff;display:grid;place-items:center;font-size:29px;line-height:1;box-shadow:0 4px 14px rgba(0,0,0,.14);cursor:pointer
}
.ca-add-circle.ca-has-qty{background:#fff;color:#1a1a1a;border:2px solid var(--ca-green);font-size:16px;font-weight:800}
.ca-card-badge{
  position:absolute;left:0;right:0;bottom:0;min-height:27px;display:flex;align-items:center;justify-content:center;
  padding:5px 9px;background:#d9f7df;color:#187640;font-size:10px;font-weight:800;letter-spacing:.01em
}
.ca-card-body{padding:10px 1px 0}
.ca-card-title{margin:0;font-size:15px;line-height:1.25;font-weight:500}
.ca-card-desc{margin:4px 0 0;color:var(--ca-muted);font-size:11px;line-height:1.35;min-height:30px}
.ca-card-price{margin-top:5px;color:#171817;font-size:15px;font-weight:800}
.ca-empty{
  grid-column:1/-1;padding:28px;border:1px solid var(--ca-line);border-radius:16px;background:#fafafa;color:var(--ca-muted)
}
.ca-order-note{margin-top:40px;padding:17px 18px;border:1px solid var(--ca-line);border-radius:16px;background:#fafafa}
.ca-order-note strong{display:block;font-size:13px}
.ca-order-note p{margin:5px 0 0;color:var(--ca-muted);font-size:11px;line-height:1.55}

/* DETAIL SHEET */
.ca-sheet-backdrop{
  position:fixed;inset:0;z-index:1000;display:none;background:rgba(0,0,0,.42)
}
.ca-sheet-backdrop.ca-open{display:block}
.ca-sheet{
  position:absolute;left:50%;top:50%;width:min(620px,calc(100% - 28px));max-height:min(92vh,820px);
  transform:translate(-50%,-50%);background:#fff;border-radius:22px;overflow:hidden;box-shadow:var(--ca-shadow)
}
.ca-sheet-scroll{max-height:min(92vh,820px);overflow-y:auto;padding-bottom:106px}
.ca-detail-image{position:relative;aspect-ratio:16/8.4;background:#a71922;overflow:hidden}
.ca-detail-image img{width:100%;height:100%;object-fit:cover}
.ca-sheet-close,.ca-sheet-share{
  position:absolute;top:15px;z-index:3;width:44px;height:44px;border:0;border-radius:50%;background:#fff;color:#131313;
  display:grid;place-items:center;box-shadow:0 3px 12px rgba(0,0,0,.12);cursor:pointer
}
.ca-sheet-close{left:15px}
.ca-sheet-share{right:15px}
.ca-sheet-close svg,.ca-sheet-share svg{width:21px;height:21px}
.ca-detail-head{padding:22px 24px 24px;border-bottom:1px solid var(--ca-line)}
.ca-detail-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.ca-detail-title-row h2{margin:0;font-size:27px;letter-spacing:-.03em}
.ca-detail-price{flex:0 0 auto;font-size:23px;font-weight:800}
.ca-detail-price small{display:block;margin-top:5px;color:var(--ca-muted);font-size:10px;font-weight:500;text-align:right}
.ca-detail-desc{margin:11px 0 0;color:var(--ca-muted);font-size:13px;line-height:1.55}
.ca-option-group{padding:24px;border-bottom:1px solid var(--ca-line)}
.ca-option-title-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.ca-option-title-row h3{margin:0;font-size:20px;letter-spacing:-.02em}
.ca-pill{
  flex:0 0 auto;padding:6px 10px;border-radius:999px;background:var(--ca-green-soft);color:var(--ca-green-dark);
  font-size:10px;font-weight:800
}
.ca-pill.ca-neutral{background:#f1f2f0;color:#555754}
.ca-pill.ca-complete{background:#2f8b4f;color:#fff}
.ca-choice{
  display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:14px;align-items:center;min-height:58px;cursor:pointer
}
.ca-choice+.ca-choice{margin-top:3px}
.ca-choice input{position:absolute;opacity:0;pointer-events:none}
.ca-control{width:21px;height:21px;border:2px solid #c8cbc7;background:#fff;display:block}
.ca-choice.ca-radio .ca-control{border-radius:50%}
.ca-choice.ca-check .ca-control{border-radius:6px}
.ca-choice input:checked+.ca-control{border-color:var(--ca-green);box-shadow:inset 0 0 0 5px #fff;background:var(--ca-green)}
.ca-choice.ca-check input:checked+.ca-control{box-shadow:none;position:relative}
.ca-choice.ca-check input:checked+.ca-control::after{
  content:"";position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)
}
.ca-choice-name{color:#3b3d3b;font-size:15px;line-height:1.35}
.ca-choice-price{color:#484a48;font-size:14px;white-space:nowrap}
.ca-choice-sub{display:block;margin-top:2px;color:var(--ca-muted);font-size:10px}
.ca-included{display:flex;align-items:flex-start;gap:11px;padding:12px 13px;border-radius:12px;background:#f5faf6;color:#405245;font-size:12px;line-height:1.5}
.ca-included-dot{
  flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:var(--ca-green);color:#fff;display:grid;place-items:center;
  font-size:12px;font-weight:900
}
.ca-sheet-footer{
  position:absolute;left:0;right:0;bottom:0;z-index:5;padding:14px 18px calc(14px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.97);border-top:1px solid var(--ca-line);backdrop-filter:blur(10px)
}
.ca-cta{
  width:100%;min-height:56px;border:0;border-radius:999px;background:var(--ca-green);color:#fff;font-weight:800;
  font-size:15px;cursor:pointer;transition:.2s ease
}
.ca-cta:disabled{background:#efefef;color:#babdb9;cursor:not-allowed}

/* STICKY BASKET */
.ca-basket-bar{
  position:fixed;left:50%;bottom:max(14px,env(safe-area-inset-bottom));z-index:900;width:min(720px,calc(100% - 28px));
  transform:translateX(-50%) translateY(120px);opacity:0;pointer-events:none;transition:.25s ease;padding:0
}
.ca-basket-bar.ca-visible{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:auto}
.ca-basket-btn{
  width:100%;min-height:58px;border:0;border-radius:999px;background:var(--ca-green);color:#fff;display:flex;align-items:center;
  justify-content:space-between;gap:18px;padding:0 24px;box-shadow:0 10px 30px rgba(21,122,67,.25);
  font-size:16px;font-weight:800;cursor:pointer
}
.ca-basket-left,.ca-basket-total{white-space:nowrap}
.ca-selection-toast{
  position:fixed;left:50%;bottom:90px;z-index:1200;max-width:calc(100% - 32px);transform:translate(-50%,18px);
  padding:11px 15px;border-radius:999px;background:#191a19;color:#fff;font-size:11px;font-weight:700;
  opacity:0;pointer-events:none;transition:.25s ease
}
.ca-selection-toast.ca-show{opacity:1;transform:translate(-50%,0)}

/* WOO PAGES */
.ca-woo-wrap{width:min(980px,calc(100% - 36px));margin:0 auto;padding:38px 0 90px}
.ca-woo-header{
  position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);border-bottom:1px solid var(--ca-line);backdrop-filter:blur(10px)
}
.ca-woo-header-inner{width:min(980px,calc(100% - 36px));margin:0 auto;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.ca-woo-brand{font-weight:900;text-decoration:none}
.ca-woo-nav{display:flex;align-items:center;gap:14px;font-size:13px;font-weight:700}
.ca-woo-cart{padding:9px 13px;border-radius:999px;background:var(--ca-green);color:#fff;text-decoration:none}
.woocommerce .woocommerce-breadcrumb{color:var(--ca-muted);font-size:12px}
.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 18px!important}
.woocommerce ul.products:before,.woocommerce ul.products:after{display:none!important}
.woocommerce ul.products li.product{float:none!important;width:auto!important;margin:0!important}
.woocommerce ul.products li.product a img{border-radius:16px;background:var(--ca-soft);margin-bottom:10px!important}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:15px!important;font-weight:700!important}
.woocommerce ul.products li.product .price{color:var(--ca-text)!important;font-weight:800!important}
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,
.woocommerce #payment #place_order{
  background:var(--ca-green)!important;color:#fff!important;border-radius:999px!important;border:0!important;padding:13px 19px!important;font-weight:800!important
}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background:var(--ca-green-dark)!important}
.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.woocommerce form .form-row select,
.select2-container--default .select2-selection--single{
  min-height:50px;border:1px solid var(--ca-line)!important;border-radius:12px!important;background:#fff!important;padding:10px 12px!important
}
.woocommerce table.shop_table{border-color:var(--ca-line)!important;border-radius:14px!important}
.woocommerce-message,.woocommerce-info,.woocommerce-error{border-top-color:var(--ca-green)!important;background:#f7faf8!important}

/* MOBILE */
@media(max-width:760px){
  .ca-page{max-width:none}
  .ca-store-cover{height:230px}
  .ca-store-info{padding:18px 18px 16px}
  .ca-store h1{font-size:25px}
  .ca-store-meta{gap:12px;font-size:11px;overflow-x:auto;white-space:nowrap;padding-bottom:2px}
  .ca-menu{padding:24px 18px 110px}
  .ca-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px}
  .ca-menu-head h2{font-size:23px}
  .ca-card-title{font-size:14px}
  .ca-card-desc{display:none}
  .ca-card-price{font-size:14px}
  .ca-card-media{border-radius:14px;aspect-ratio:1/.93}
  .ca-add-circle{width:39px;height:39px;font-size:27px}
  .ca-sheet{
    left:0;right:0;bottom:0;top:auto;width:100%;max-height:94vh;transform:none;border-radius:22px 22px 0 0
  }
  .ca-sheet-scroll{max-height:94vh}
  .ca-detail-image{aspect-ratio:16/8.3}
  .ca-detail-head{padding:20px 18px 22px}
  .ca-detail-title-row h2{font-size:23px}
  .ca-detail-price{font-size:19px}
  .ca-option-group{padding:22px 18px}
  .ca-option-title-row h3{font-size:19px}
  .ca-choice{min-height:57px;grid-template-columns:24px minmax(0,1fr) auto;gap:12px}
  .ca-choice-name{font-size:15px}
  .ca-woo-wrap{width:calc(100% - 28px);padding-top:24px}
  .ca-woo-header-inner{width:calc(100% - 28px)}
  .ca-woo-nav a:not(.ca-woo-cart){display:none}
  .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px 12px!important}
  .woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:13px!important}
  .woocommerce ul.products li.product .button{width:100%;font-size:12px!important;padding:11px 8px!important}
  .woocommerce-checkout .col2-set .col-1,.woocommerce-checkout .col2-set .col-2{width:100%!important;float:none!important}
  .woocommerce .cart-collaterals .cart_totals,.woocommerce-page .cart-collaterals .cart_totals{width:100%!important;float:none!important}
  .woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.woocommerce form .form-row select{font-size:16px!important}
  .woocommerce #payment #place_order{width:100%;min-height:54px}
}
@media(max-width:390px){
  .ca-store-cover{height:205px}
  .ca-grid{column-gap:12px}
  .ca-store-meta{gap:10px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .ca-card-media img,.ca-selection-toast,.ca-basket-bar{transition:none}
}
