/* ------------------------------
   Pastura Cart — Base Layout
--------------------------------*/











/* ==========================================
   Global Reset & Base Styles
   ========================================== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
 
  overflow-x: hidden;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: #fafafa;
  background-size: cover;
  background-attachment: fixed;
   -webkit-font-smoothing: antialiased;

}




/* 1) استقرار عام */
html {
  box-sizing: border-box;
  scrollbar-gutter: stable both-edges; /* يمنع اختلاف العرض بسبب شريط التمرير */
}


@media (max-width: 768px) {
  /* حماية من التمايل الأفقي بسبب 100vw أو سكروول */
  html, body { max-width: 100%; overflow-x: hidden; }


  /* 4) منع تكبير النص التلقائي على iOS */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

}






/* ==========================================
   Main Navbar – Global Style (Relative Units)
   ========================================== */
/* ===== Desktop (≥768px) ===== */
@media (min-width: 48em) {
 .main-nav {
  display: flex;
  justify-content: space-between;  /* Pastura يسار / USA يمين */
             /* محاذاة عمودية وسط */
  padding: 1vh 2vw;
  background-color: rgba(179, 201, 185, 0.9);
  height: 12vh;                    /* شريط مرن */
  box-shadow: 0 .2vh .8vh rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 3000;
  box-sizing: border-box;
}

  .nav-links ul {
    display: flex;
    gap: 2vw;
    list-style: none;
    margin: 0;
    padding: 0;
  }

 .main-nav a {
  flex: 0 1 auto;                     /* يسمح لها بالتقلص */
  font-weight: 500;
  text-decoration: none;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: #fff;
  padding: clamp(0.4rem, 1vh, 0.6rem) clamp(0.8rem, 2vw, 1.2rem);
 
  border-radius: 0.5rem;
  white-space: nowrap;                /* ما يتكسر النص */
  max-width: 75%;                     /* نصف عرض الشريط تقريبًا */
  overflow: hidden;                   /* يخفي النص الزايد */
           /* يضيف … إذا صار النص طويل */
}


  .main-nav a:hover { color: #ffd5d5; }
}

/* ===== Mobile (≤767px) ===== */
@media (max-width: 47.9em) {
 .main-nav {
  display: flex;
  justify-content: space-between;  /* Pastura يسار / USA يمين */
  align-items: center;             /* محاذاة عمودية وسط */
  padding: 1vh 2vw;
  background-color: rgba(131, 163, 156, 0.85);
               
  box-shadow: 0 .2vh .8vh rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
   left: 0;
  width: 100%;
  z-index: 3000;
  box-sizing: border-box;
}

li {
  list-style-type: none;
}





  .nav-links ul {
    display: flex;
    gap: 4vw; /* فراغ أكبر للموبايل */
    list-style: none;
    margin: 0;
    padding: 0;
  }

 .main-nav a {
  flex: 0 1 auto;                     /* يسمح لها بالتقلص */
  font-weight: 700;
  text-decoration: none;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: #fff;
  padding: clamp(0.4rem, 1vh, 0.6rem) clamp(0.8rem, 2vw, 1.2rem);
  background: #66807a;
  border-radius: 0.5rem;
  white-space: nowrap;                /* ما يتكسر النص */
  max-width: 45%;                     /* نصف عرض الشريط تقريبًا */
  overflow: hidden;                   /* يخفي النص الزايد */
  text-overflow: ellipsis;            /* يضيف … إذا صار النص طويل */
}


  .main-nav a:hover { color: #ffd5d5; }
}












/* Container */
main.cart-container {
  max-width: 720px;
  margin: 2rem auto;
  background: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: 0.2s;
}

/* Title */
h1 {
  text-align: center;
  color: #2c2c2c;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.7rem;
}

h2 {
  text-align: right;
  color: #444;
  font-weight: 500;
  margin-top: 1rem;
}

/* ------------------------------
   Cart Items
--------------------------------*/
.checkout-item {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid #9fac9fcc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.checkout-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #2b2b2b;
}

.checkout-item p {
  margin: 0.3rem 0;
  color: #555;
  font-size: 0.95rem;
}

.checkout-item button {
  margin-top: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: #d9534f;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.checkout-item button:hover {
  background: #c3413e;
}

/* ------------------------------
   Cart Actions
--------------------------------*/
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.cart-actions button,
.checkout-btn {
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: 0.25s ease-in-out;
  width: 100%;
  font-weight: 600;
}

/* Clear Cart */
.cart-actions button {
  background: rgba(131, 163, 156, 0.85);
  color: #f7f5f5;
}
.cart-actions button:hover {
  background: #7e8a87;
}

/* Checkout Button */
.checkout-btn {
  background: rgba(131, 163, 156, 0.85);               /* Pastura Green */
  color: white;
  box-shadow: 0 3px 8px rgba(0, 128, 0, 0.25);
}
.checkout-btn:hover {
  background: #7e8a87;               /* Darker */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 128, 0, 0.35);
}

/* ------------------------------
   Empty Cart Message
--------------------------------*/
.empty-cart {
  text-align: center;
  padding: 2rem;
  color: #7a5d5d;
  font-size: 1rem;
}

/* ------------------------------
   Responsive — Mobile
--------------------------------*/
@media (max-width: 480px) {
  main.cart-container {
    margin: 1rem;
    padding: 1.4rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .checkout-item {
    padding: 0.9rem;
  }

  .checkout-item h3 {
    font-size: 1rem;
  }

  .checkout-btn,
  .cart-actions button {
    font-size: 0.95rem;
    padding: 0.8rem;
  }
}

/* ------------------------------
   Responsive — iPad (Tablets)
--------------------------------*/
@media (min-width: 600px) and (max-width: 1024px) {
  main.cart-container {
    max-width: 820px;
    padding: 2.2rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  .checkout-item h3 {
    font-size: 1.15rem;
  }

  .cart-actions {
    flex-direction: row;
    justify-content: space-between;
  }

  .cart-actions button,
  .checkout-btn {
    width: 48%;
    font-size: 1rem;
  }
}

/* ------------------------------
   Desktop Enhancements
--------------------------------*/
@media (min-width: 1025px) {
  .checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .checkout-item p {
    font-size: 1rem;
  }
}



/* ============================================================
   Pastura Checkout Button — Enhanced Version (Official)
   Adds: Spinner, Disabled State, Smooth Animations
============================================================ */

/* ✅ Spinner inside button */
.checkout-btn .spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.5);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ✅ Spinner Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ✅ Disabled State (During Checkout Processing) */
.checkout-btn.disabled {
  background: #7d7d7d !important;
  cursor: not-allowed;
  opacity: 0.75;
  transform: none !important;
  box-shadow: none !important;
}

/* ✅ Mobile refinement */
@media (max-width: 480px) {
  .checkout-btn {
    gap: 6px;
    font-size: 0.9rem;
    padding: 0.75rem 1.1rem;
    border-radius: 8px;
  }
}

/* ✅ iPad refinement */
@media (min-width: 600px) and (max-width: 1024px) {
  .checkout-btn {
    font-size: 1rem;
    padding: 0.95rem 1.3rem;
  }
}








/* ------------------------------
   Checkout Section — Base Layout
--------------------------------*/
.checkout-section {
  margin-top: 2rem;
  background: #ffffff;
  padding: 1.8rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border: 1px solid #e5e5e5;
}

.checkout-section h2 {
  font-size: 1.4rem;
  color: #2b2b2b;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

/* ------------------------------
   Checkout Block Sections
--------------------------------*/
.checkout-block {
  background: #f7f5f5;
  padding: 1.3rem;
  margin-bottom: 1.4rem;
  border-radius: 10px;
  border-left: 4px solid #9fac9fcc;
  box-shadow: 0 2px 6px rgba(83, 83, 83, 0.05);
}

.checkout-block h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

/* ------------------------------
   Checkout Inputs
--------------------------------*/
.checkout-block label {
  display: block;
  margin-bottom: 0.4rem;
  color: #080808;
  font-size: 0.95rem;
  font-weight: 500;
}

.checkout-block input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: #fff;
  transition: border-color 0.2s;
}

.checkout-block input:focus {
  border-color: #3c8a1d;
  box-shadow: 0 0 0 3px rgba(60,138,29,0.15);
}

/* ------------------------------
   Payment Note
--------------------------------*/
.method-note {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}

/* ------------------------------
   Payment Button
--------------------------------*/
.pay-btn {
  width: 100%;
  padding: 1rem;
  background: #3c8a1d;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 128, 0, 0.25);
  transition: 0.25s ease;
}

.pay-btn:hover {
  background: #326f18;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 128, 0, 0.35);
}

/* ------------------------------
   Error Message
--------------------------------*/
.checkout-error {
  background: #ffdddd;
  color: #a10000;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  border: 1px solid #e3b5b5;
  margin-top: 1rem;
}

/* ------------------------------
   Responsive — Mobile
--------------------------------*/
@media (max-width: 480px) {
  .checkout-section {
    padding: 1.4rem;
  }

  .checkout-block {
    padding: 1rem;
  }

  .checkout-section h2 {
    font-size: 1.2rem;
  }

  .pay-btn {
    font-size: 1rem;
    padding: 0.85rem;
  }
}

/* ------------------------------
   Responsive — iPad / Tablets
--------------------------------*/
@media (min-width: 600px) and (max-width: 1024px) {
  .checkout-section {
    padding: 2rem 1.8rem;
  }

  .checkout-block {
    padding: 1.5rem;
  }

  .checkout-section h2 {
    font-size: 1.6rem;
  }

  .pay-btn {
    padding: 1.1rem;
    font-size: 1.1rem;
  }
}





/* ===== Pastura Send Button ===== */
.logo {
 

 display: flex;
  padding: 0.55rem 1.4rem;       /* حجم الزر */
  border-radius: 6px;          /* شكل كبسولة */
  background: #9fac9fcc; /* ألوان قريبة من الطابع الزراعي */
  color: #fff;
 
  font-weight: 400;
  text-decoration: none;         /* إزالة خط الرابط */
 
  cursor: pointer;
  border: 2px solid  #133113cc;
  align-items: center;
  justify-content: center;

}
.logo:hover {
  background: #9fac9fcc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
 
}

.logo:active {

 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}



.logo:focus-visible {
 outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-color: #d8f3dc;
}






@media only screen
  and (min-width: 1024px)
  and (max-width: 1919px)
  and (hover: hover)
  and (pointer: fine) {

.logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
  .main-nav {
 height: 12vh; 
}
}

/* Wide Desktop */
@media (min-width: 1920px) {

.logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
   .main-nav {
 height: 20vh; 
}
}

/* Mobile Portrait */
@media (orientation: portrait) and (min-width: 368px) and (max-width: 480px) {

 .logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  } 
   .main-nav {
 height: 10vh; 
}
}
/* Mobile Portrait */
@media (orientation: portrait) and (max-width: 367px) { 
.logo {
    position: fixed;
    display: flex;
    top: 28px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
   .main-nav {
 height: 12vh; 
}
}


/* ==========================================
   📲 1. MOBILE LANDSCAPE-1
   ========================================== */
@media (orientation: landscape) and (max-width: 699px) {
.logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 110px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
 .main-nav {
 height: 20vh; 
}
}

/* ==========================================
   📲 1. MOBILE LANDSCAPE-2
   ========================================== */
@media (orientation: landscape) and (min-width: 700px) and (max-width: 889px) {

.logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
 .main-nav {
 height: 20vh; 
}
}




/*==========================================
 Tablet Portrait
 =========================================== */
@media (orientation: portrait) and (min-width: 481px) and (max-width: 1249px) {

 .logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
   .main-nav {
 height: 10vh; 
}
}


/* ==========================================
   💻  TABLET LANDSCAPE
   ========================================== */

@media only screen 
  and (min-device-width: 899px)
  and (max-device-width: 1370px)
  and (orientation: landscape)
  and (-webkit-min-device-pixel-ratio: 2) {


.logo {
    position: fixed;
    display: flex;
    top: 25px;
    left: 10px;
    width: 100px;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    padding: 1.5vh 3vw;
  }
   .main-nav {
 height: 12vh; 
}
}


















/* ==========================================
   🖥️ LAPTOP / DESKTOP STANDARD
   ========================================== */
@media (min-width: 1300px) and (max-width: 1919px) {


.secure-checkout-wrapper {
  position: relative;
   right: -77vw;
  top: 0.5vh;
}
 
}

/* Wide Desktop */
@media (min-width: 1920px) {


.secure-checkout-wrapper {
  position: relative;
   right: -77vw;
  top: -5.5vh;
}
}

/* Mobile Portrait */
@media (orientation: portrait) and (min-width: 368px) and (max-width: 480px) {


.cart-container {

  margin-top: 10vh !important;
}
  
.secure-checkout-wrapper {
  position: relative;
   right: -50vw;
  top: 0vh;
}

/* زر Secure checkout */
.secure-checkout-btn {
height: 40px;
  width: 36vw !important;
}
}
/* Mobile Portrait */
@media (orientation: portrait) and (max-width: 367px) { 

 


.cart-container {

  margin-top: 10vh !important;
}



.secure-checkout-wrapper {
  position: relative;
   right: -40vw;
  top: 1vh;
} 



/* زر Secure checkout */
.secure-checkout-btn {
height: 34px;
  width: 42vw !important;
}
}


/* ==========================================
   📲 1. MOBILE LANDSCAPE
   ========================================== */
@media (orientation: landscape) and (max-width: 889px) {


.secure-checkout-wrapper {
  position: relative;
   right: -70vw;
  top: 1vh;
}
}

/* Tablet / iPad Portrait */
@media (orientation: portrait) and (min-width: 490px) and (max-width: 1249px) {

.cart-container {

  margin-top: 10vh !important;
}
  
.secure-checkout-wrapper {
  position: relative;
   right: -70vw;
  top: 1vh;
}

/* زر Secure checkout */
.secure-checkout-btn {

  width: 20vw !important;
}
}
 



/* ==========================================
   💻 3. TABLET LANDSCAPE
   ========================================== */
@media (min-width: 890px) and (max-width: 1299px) and (orientation: landscape) {

.secure-checkout-wrapper {
  position: relative;
   right: -77vw;
  top: 1vh;
}


}


.shipping-box { border:1px solid #e5e5e5; border-radius:12px; padding:14px; margin:14px 0; }
.shipping-banner { background:#f7f7f7; padding:10px 12px; border-radius:10px; margin-bottom:10px; font-size:14px; }
.shipping-form { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.shipping-form label { display:flex; flex-direction:column; font-size:13px; gap:6px; }
.shipping-form input, .shipping-form select { padding:10px; border:1px solid #ddd; border-radius:10px; min-width:180px; }
.shipping-form button { padding:10px 14px; border-radius:10px; border:0; cursor:pointer; }
.shipping-result { margin-top:10px; font-size:14px; line-height:1.5; }
.ship-ok { padding:10px; border-radius:10px; border:1px solid #cfe9d6; }
.ship-warn { padding:10px; border-radius:10px; border:1px solid #f2d6a3; }
.ship-err { padding:10px; border-radius:10px; border:1px solid #f1b0b7; }





















/* زر Secure checkout */
.secure-checkout-btn {
 
 display: flex;
  padding: 0.55rem 1.4rem;       /* حجم الزر */
  border-radius: 6px;          /* شكل كبسولة */
  background: #9fac9fcc; /* ألوان قريبة من الطابع الزراعي */
  color: #fff;
 
  font-weight: 400;
  text-decoration: none;         /* إزالة خط الرابط */
 
  cursor: pointer;
  border: 2px solid  #133113cc;
  align-items: center;
  justify-content: center;
}

.secure-checkout-btn:hover {
 background: #9fac9fcc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
 
}

  .secure-checkout-btn:active {

 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}



    .secure-checkout-btn:focus-visible {

 outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-color: #d8f3dc;
}









/* الحاوية المندسلة */
.secure-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 32px;
  max-width: 320px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 9999;
  display: none;            /* مخفية افتراضياً */
}

/* عند التفعيل */
.secure-popover.visible {
  display: block;
}

/* السهم الصغير للأعلى */
.secure-popover::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

/* محتوى الحاوية */
.secure-popover-inner {
  padding: 12px 14px 10px;
  position: relative;
  font-size: 13px;
  line-height: 1.4;
  color: #111;
}

/* زر الإغلاق × */
.secure-close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

/* رابط Learn more */
.secure-learn-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #007185;          /* ستايل شبيه بأمازون */
  text-decoration: none;
}

.secure-learn-more:hover {
  text-decoration: underline;
}









nav .nav-links li::marker {
  content: none;
}





.cart-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.checkout-error {
  flex-basis: 100%;
  color: #b00020; /* أو حسب نظام الألوان عندك */
  margin-top: 0.5rem;
}







/* Shipping result box styling */
#shippingResult.shipping-result {
  display: none; /* سيظهره JS عند وجود نتيجة */
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  font-size: 14px;
  line-height: 1.45;
}

/* Lines inside the result */
#shippingResult .ship-line {
  margin: 6px 0;
  color: #222;
}

/* Destination line (first line) */
#shippingResult .ship-line:first-child {
  font-size: 14px;
  color: #111;
}

/* Blocked items (warning style) */
#shippingResult .ship-blocked {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.07);
  color: #7f1d1d;
}

/* Optional: a subtle success/ok highlight when status OK */
#shippingResult[data-status="OK"] {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.05);
}

/* Optional: manual quote highlight */
#shippingResult[data-status="MANUAL_QUOTE"] {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.06);
}

/* Address extra textarea */
#addressExtra {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  font-size: 14px;
  resize: vertical;
  min-height: 42px;
}

#addressExtra:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Buttons (optional polishing) */
.shipping-form button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #111;
  color: #fff;
  cursor: pointer;
}

.shipping-form button:hover {
  opacity: 0.92;
}

.shipping-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
