/*
Theme Name: Oth-Ecommerce
Theme URI: 
Author: othmane men
Author URI: 
Description: new ecommerce template
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oth-ecommerce
Tags: 
*/

/*---------------- Header Template Part Fix ----------------*/
/* Remove margin from header template part */
.wp-block-template-part header,
header.wp-block-template-part {
  margin-block-start: 0 !important;
}

/*---------------- Header Navigation Edits ----------------*/
/* Make navigation items flex containers for better control */
.wp-block-navigation__container .wp-block-navigation-item {
  position: relative;
  padding-right: 1.5rem;
  /* Space for separator */
}

.wp-block-navigation__container .wp-block-navigation-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(15deg);
  height: 1.4em;
  width: 1px;
  background-color: currentColor;
  opacity: 0.3;
  pointer-events: none;
}

/* Hide separators only when the responsive (overlay) menu is open */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container .wp-block-navigation-item:not(:last-child)::after,
.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation__container .wp-block-navigation-item:not(:last-child)::after {
  content: none;
  margin: 0;
}

/* -------------Custom WooCommerce Sale Badge Styling ---------------*/
.wc-block-components-product-sale-badge {
  /* Override default right alignment */
  right: auto !important;
  left: 12px !important;

  /* Rotate the badge vertically */
  transform: rotate(270deg) !important;
  transform-origin: left top !important;

  /* Switch colors: white text on dark background */
  background-color: var(--wp--preset--color--contrast) !important;
  color: var(--wp--preset--color--base) !important;

  /* Adjust positioning after rotation */
  top: 68px !important;
}

/* Style the text inside the badge */
.wc-block-components-product-sale-badge__text {
  color: inherit !important;
}



/* --- HIDE PAYMENT TEXT & BACKGROUND (Applied on all devices) --- */

/* 1. Remove the grey background/padding from the payment container */
#payment {
    background: transparent !important;
    padding: 0 !important;
}

/* 2. Hide "Cash on Delivery" and "Pay with cash..." text/radios */
#payment ul.payment_methods {
    display: none !important;
}

/* 3. Hide the Privacy Policy text */
#payment .woocommerce-terms-and-conditions-wrapper,
#payment .woocommerce-privacy-policy-text {
    display: none !important;
}

/* 4. Style the "Place Order" button container to align nicely */
#payment .place-order {
    padding: 0 !important;
    margin-top: 15px; /* Add a little space above the button */
    width: 100%;
}

/* Optional: Make the button full width to look better */
#place_order {
    width: 100%;
    display: block;
}
