/*
Theme Name: Xtra Child
Theme URI: 
Description: Child theme for Xtra
Author: You
Template: xtra
Version: 1.0
*/

/* IMPORTANT: Force CSS to load with high specificity */
html .woocommerce form.checkout,
html body .woocommerce .checkout {
  all: revert;
}

/* =============================================
   YOUR CUSTOM CSS GOES BELOW THIS LINE
   ============================================= */
.page_cover.xtra-cover-type-rev {
  display: none !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
  color: #000000;
  background-color: #ffffff;
}

/* ── NAV MENU ── */
.birq-nav-menu ul {
  display: none !important;
}

.birq-nav-menu {
  flex-direction: row !important;
  align-items: center !important;
}

.birq-nav-menu > li {
  display: inline-flex !important;
  align-items: center !important;
}

.birq-nav-menu > li > a {
  font-size: 14px !important;
  color: #333 !important;
  padding: 18px 16px !important;
  font-family: 'Tajawal', Arial, sans-serif !important;
  font-weight: 500 !important;
  border-bottom: 3px solid transparent !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
}

.birq-nav-menu > li > a:hover,
.birq-nav-menu > li.current-menu-item > a {
  color: #6a0dad !important;
  border-bottom: 3px solid #6a0dad !important;
}

/* ── HAMBURGER ── */
.birq-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  padding: 4px;
}

/* ── MOBILE DRAWER ── */
.birq-mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 999999;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  direction: rtl;
  overflow-y: auto;
}

.birq-mobile-drawer.open {
  right: 0;
}

.birq-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 999998;
}

.birq-mobile-overlay.open {
  display: block;
}

.birq-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.birq-drawer-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #333;
}

.birq-mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.birq-mobile-nav li a {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-family: 'Tajawal', Arial, sans-serif;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
  transition: color 0.2s, background 0.2s;
}

.birq-mobile-nav li a:hover {
  color: #6a0dad;
  background: #f9f5ff;
}

.birq-mobile-nav ul {
  display: none !important;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .birq-navbar {
    display: none !important;
  }

  .birq-topbar {
    padding: 10px 16px !important;
    position: relative !important;
  }

  .birq-topbar-right .birq-lang-btn {
    display: none !important;
  }

  .birq-topbar-right .birq-search-btn {
    display: none !important;
  }

  .birq-icon-link .birq-label,
  .birq-icon-link .birq-sublabel {
    display: none !important;
  }

  .birq-topbar-left .birq-icon-link:first-child {
    display: none !important;
  }

  .birq-topbar-center img {
    height: 40px !important;
  }

  .birq-hamburger {
    display: flex !important;
  }

  .birq-mobile-drawer {
    display: block;
  }
}

/* ── DESKTOP ── */
@media (min-width: 769px) {
  .birq-hamburger {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .birq-topbar {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
  }

  .birq-topbar-right {
    justify-content: flex-start !important;
  }

  .birq-topbar-center {
    display: flex !important;
    justify-content: center !important;
  }

  .birq-topbar-left {
    justify-content: flex-end !important;
  }
}

@media (max-width: 768px) {
  #waBubble {
    right: 80px !important;
    left: 10px !important;
    bottom: 32px !important;
    white-space: normal !important;
    max-width: calc(100vw - 110px) !important;
    font-size: 13px !important;
    padding: 12px 20px 12px 16px !important;
  }

  #waBubble::after {
    display: none !important;
  }

  #waClose {
    top: -10px !important;
    left: -10px !important;
  }

  .whatsapp-sticky {
    right: 16px !important;
    bottom: 64px !important;
  }
}
@media (max-width: 1024px) {
  #waBubble {
    right: 80px !important;
    left: auto !important;
    bottom: 68px !important;
    white-space: nowrap !important;
    max-width: 280px !important;
    font-size: 13px !important;
    padding: 12px 20px 12px 16px !important;
  }

  #waClose {
    top: -10px !important;
    left: -10px !important;
  }


}

/* =============================================
   BILINGUAL RTL/LTR CHECKOUT STYLING
   ============================================= */

/* Checkout Container */
.woocommerce .checkout {
  max-width: 100%;
  padding: 30px 0;
}

.woocommerce form.checkout {
  display: grid;
  gap: 40px;
}

/* Checkout RTL Direction */
.checkout-rtl,
.xtra-rtl-checkout {
  direction: rtl !important;
}

.checkout-rtl .woocommerce form.checkout,
.xtra-rtl-checkout .woocommerce form.checkout {
  direction: rtl;
}

.checkout-rtl input,
.checkout-rtl select,
.checkout-rtl textarea,
.xtra-rtl-checkout input,
.xtra-rtl-checkout select,
.xtra-rtl-checkout textarea {
  text-align: right;
}

/* Checkout LTR Direction */
.checkout-ltr,
.xtra-ltr-checkout {
  direction: ltr !important;
}

.checkout-ltr input,
.checkout-ltr select,
.checkout-ltr textarea,
.xtra-ltr-checkout input,
.xtra-ltr-checkout select,
.xtra-ltr-checkout textarea {
  text-align: left;
}

/* Checkout Form Section */
.woocommerce form.checkout #customer_details,
.woocommerce form.checkout #order_review {
  margin-bottom: 30px;
}

.woocommerce .col2-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
  flex: 1;
}

/* Form Groups */
.woocommerce .form-row {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.woocommerce .form-row.form-row-first,
.woocommerce .form-row.form-row-last,
.woocommerce .form-row.form-row-first.address-field,
.woocommerce .form-row.form-row-last.address-field {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

.woocommerce .form-row-first .input-text,
.woocommerce .form-row-last .input-text {
  width: 100%;
}

/* Labels */
.woocommerce form .form-row label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  display: block;
  font-size: 14px;
}

.woocommerce form .form-row label .required {
  color: #e74c3c;
  margin-left: 3px;
}

.checkout-rtl .woocommerce form .form-row label .required {
  margin-left: 0;
  margin-right: 3px;
}

/* Input Fields */
.woocommerce input.input-text,
.woocommerce textarea.input-text,
.woocommerce select {
  width: 100% !important;
  padding: 12px 14px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  background-color: #fff !important;
  color: #333 !important;
  transition: all 0.3s ease !important;
}

.woocommerce input.input-text:focus,
.woocommerce textarea.input-text:focus,
.woocommerce select:focus {
  outline: none !important;
  border-color: #6a0dad !important;
  box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1) !important;
}

.woocommerce input.input-text::placeholder {
  color: #999;
}

/* Textarea */
.woocommerce textarea.input-text {
  min-height: 120px;
  resize: vertical;
}

/* Select Fields */
.woocommerce select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23333" d="M1 1l5 5 5-5"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

.checkout-rtl select,
.xtra-rtl-checkout select {
  background-position: left 12px center;
  padding-right: 14px;
  padding-left: 35px;
}

/* Order Review Section */
.woocommerce-checkout #order_review {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

/* Order Summary */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.woocommerce table.shop_table th {
  background-color: #f9f9f9;
  color: #333;
  font-weight: 600;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #e0e0e0;
  font-size: 14px;
}

.checkout-rtl table.shop_table th,
.xtra-rtl-checkout table.shop_table th {
  text-align: right;
}

.woocommerce table.shop_table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  color: #555;
}

.woocommerce table.shop_table tbody tr:hover {
  background-color: #fafafa;
}

/* Order Total Section */
.woocommerce table.shop_table tfoot tr td,
.woocommerce table.shop_table tfoot tr th {
  border-top: 2px solid #ddd;
  padding: 15px 12px;
  background-color: #fafafa;
  font-weight: 500;
}

.woocommerce table.shop_table tfoot tr.order-total td,
.woocommerce table.shop_table tfoot tr.order-total th {
  background-color: #f9f5ff;
  color: #6a0dad;
  font-size: 16px;
  font-weight: 600;
}

/* Place Order Button */
.woocommerce-checkout #place_order {
  width: 100% !important;
  padding: 15px 30px !important;
  background-color: #6a0dad !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin-top: 20px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.woocommerce-checkout #place_order:hover {
  background-color: #550a8a !important;
  box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3) !important;
}

.woocommerce-checkout #place_order:active {
  transform: translateY(1px) !important;
}

/* Checkout Information Section */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

/* Checkbox */
.woocommerce input[type="checkbox"],
.woocommerce input[type="radio"] {
  margin-right: 8px;
}

.checkout-rtl input[type="checkbox"],
.checkout-rtl input[type="radio"],
.xtra-rtl-checkout input[type="checkbox"],
.xtra-rtl-checkout input[type="radio"] {
  margin-right: 0;
  margin-left: 8px;
}

.woocommerce .form-row.form-row-wide label {
  display: flex;
  align-items: center;
}

/* Validation Errors */
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-notice {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
}

.woocommerce .woocommerce-error {
  background-color: #fee;
  border-left: 4px solid #e74c3c;
  color: #c00;
}

.checkout-rtl .woocommerce .woocommerce-error,
.xtra-rtl-checkout .woocommerce .woocommerce-error {
  border-left: none;
  border-right: 4px solid #e74c3c;
}

.woocommerce .woocommerce-info {
  background-color: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1976d2;
}

.checkout-rtl .woocommerce .woocommerce-info,
.xtra-rtl-checkout .woocommerce .woocommerce-info {
  border-left: none;
  border-right: 4px solid #2196f3;
}

/* Form Validation */
.woocommerce input.woocommerce-invalid,
.woocommerce select.woocommerce-invalid,
.woocommerce textarea.woocommerce-invalid {
  border-color: #e74c3c !important;
}

.woocommerce input.woocommerce-valid,
.woocommerce select.woocommerce-valid,
.woocommerce textarea.woocommerce-valid {
  border-color: #27ae60 !important;
}

/* Payment Methods */
.woocommerce #payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce #payment ul.payment_methods li {
  padding: 15px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.woocommerce #payment ul.payment_methods li:hover {
  background-color: #fff;
  border-color: #6a0dad;
  box-shadow: 0 2px 8px rgba(106, 13, 173, 0.1);
}

.woocommerce #payment ul.payment_methods li input[type="radio"] {
  margin-top: 3px;
}

/* Coupon Section */
.woocommerce-checkout .woocommerce-form-coupon {
  background-color: #f9f5ff;
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.woocommerce-checkout .woocommerce-form-coupon input {
  width: 70%;
  display: inline-block;
  margin-right: 10px;
}

.checkout-rtl .woocommerce-checkout .woocommerce-form-coupon input,
.xtra-rtl-checkout .woocommerce-checkout .woocommerce-form-coupon input {
  margin-right: 0;
  margin-left: 10px;
}

.woocommerce-checkout .woocommerce-form-coupon button {
  width: 25%;
  display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .woocommerce form.checkout {
    gap: 20px;
    padding: 20px 0;
  }

  .woocommerce .col2-set {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .woocommerce .form-row {
    margin-bottom: 15px;
  }

  .woocommerce form .form-row label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .woocommerce input.input-text,
  .woocommerce textarea.input-text,
  .woocommerce select {
    padding: 10px 12px;
    font-size: 13px;
  }

  .woocommerce-checkout #place_order {
    padding: 12px 20px;
    font-size: 14px;
    margin-top: 15px;
  }

  .woocommerce-billing-fields h3,
  .woocommerce-shipping-fields h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 12px;
  }

  .woocommerce table.shop_table {
    font-size: 13px;
  }

  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td {
    padding: 8px;
  }

  .woocommerce-checkout .woocommerce-form-coupon input {
    width: 60%;
  }

  .woocommerce-checkout .woocommerce-form-coupon button {
    width: 35%;
  }
}

@media (max-width: 480px) {
  .woocommerce input.input-text,
  .woocommerce textarea.input-text,
  .woocommerce select {
    padding: 8px 10px;
    font-size: 12px;
  }

  .woocommerce form .form-row label {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .woocommerce table.shop_table {
    font-size: 11px;
  }

  .woocommerce table.shop_table th,
  .woocommerce table.shop_table td {
    padding: 6px 4px;
  }

  .woocommerce-checkout #place_order {
    padding: 10px 15px;
    font-size: 13px;
  }
}

