/* =========================
   components.css
========================= */

.icon-box{

  display:flex;
  flex-direction:column;
  align-items:center;

  gap:4px;

  font-size:11px;

  cursor:pointer;
}

.icon-box i{
  font-size:18px;
}

.navbar a{

  font-size:13px;
  font-weight:500;

  transition:0.3s;

  color:#222;
}

.navbar a:hover{
  color:#9fc62b;
}

.hero-small{

  color:#9fc62b;

  font-size:12px;
  letter-spacing:2px;

  margin-bottom:10px;
}

/* SMALLER HERO TITLE */
.hero-text h1{

  font-size:36px;

  line-height:1.1;

  margin-bottom:12px;

  font-weight:700;
}

.hero-text h1 span{
  color:#f35f6f;
}

/* SMALLER DESCRIPTION */
.hero-description{

  font-size:14px;
  color:#555;

  margin-bottom:20px;

  max-width:460px;
}

.hero-buttons{

  display:flex;
  gap:12px;
}

.btn-primary{

  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#111;
  text-decoration:none;

  height:42px;
  padding:0 24px;

  border:none;
  border-radius:40px;

  background:#d9ef7a;

  font-weight:600;

  font-size:13px;

  cursor:pointer;

  transition:0.3s;
}

.btn-primary:hover{
  transform:translateY(-2px);
}

.btn-secondary{

  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#111;
  text-decoration:none;

  height:42px;
  padding:0 24px;

  border:none;
  border-radius:40px;

  background:white;

  font-weight:600;

  font-size:13px;

  cursor:pointer;

  transition:0.3s;
}

.btn-secondary:hover{
  transform:translateY(-2px);
}

.feature-box{

  background:white;

  border-radius:18px;

  padding:18px;

  display:flex;
  gap:12px;

  align-items:flex-start;
}

.feature-box i{

  font-size:22px;

  margin-top:2px;
}

.feature-box h4{

  margin-bottom:4px;

  font-size:14px;
}

.feature-box p{

  color:#666;
  font-size:12px;
}

.card{

  display:block;
  color:inherit;
  text-decoration:none;

  position:relative;

  border-radius:25px;

  overflow:hidden;

  min-height:210px;

  padding:22px;

  cursor:pointer;

  transition:0.3s;
}

.card:hover{
  transform:translateY(-5px);
}

.card img{

  position:absolute;

  bottom:0;
  right:0;

  width:155px;
}

.card h3{

  font-size:24px;

  margin-bottom:8px;

  font-weight:700;
}

.card p{

  color:#555;

  width:70%;

  font-size:13px;

  line-height:1.5;
}

.green-card{
  background:#eef6df;
}

.pink-card{
  background:#f9e1e5;
}

.beige-card{
  background:#f4ead9;
}

.purple-card{
  background:#e5e3f7;
}

.favorite-button{

    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: 1px solid #ddd;

    background: white;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.3s;
}

.favorite-button i{

    color: #999;
    font-size: 16px;
}

.favorite-active{

    background: #e63946;
}

.favorite-active i{

    color: white;
}

/* FAVORITES PAGE */

.products-grid{

    display: grid;

    grid-template-columns:
        repeat(auto-fit,minmax(260px,1fr));

    gap: 30px;

    margin-top: 40px;
}

.favorite-card{

    position: relative;

    background: white;

    border-radius: 24px;

    padding: 20px;

    overflow: hidden;

    box-shadow:
        0 5px 20px rgba(0,0,0,0.08);

    transition: 0.3s;
}

.favorite-card:hover{

    transform: translateY(-5px);
}

.favorite-remove-heart{

    position: absolute;

    top: 18px;
    right: 18px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: #fff0f0;

    color: #e53935;

    font-size: 18px;

    cursor: pointer;

    z-index: 10;
}

.favorite-image-wrapper{

    width: 100%;
    height: 260px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.product-card-image{

    max-width: 100%;
    max-height: 220px;

    object-fit: contain;
}

.product-card-content{

    text-align: center;
}

.product-card-content h3{

    font-size: 18px;

    margin-bottom: 10px;
}

.product-card-content p{

    color: #2e8b57;

    font-weight: 600;

    margin-bottom: 20px;
}

.favorite-actions{

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-top: 20px;
}

.view-product-button,
.add-cart-button{

    width: 100%;

    border: none;

    padding: 14px;

    border-radius: 14px;

    text-decoration: none;

    font-weight: 600;

    cursor: pointer;
}

.view-product-button{

    background: #f5f5f5;

    color: black;
}

.add-cart-button{

    background: #111;

    color: white;
}
.checkout-page{

    padding: 60px 8%;
}

.checkout-container{

    display: grid;

    grid-template-columns:
        1.2fr 0.8fr;

    gap: 40px;
}

.checkout-form,
.checkout-summary{

    background: white;

    padding: 30px;

    border-radius: 24px;

    box-shadow:
        0 5px 20px rgba(0,0,0,0.08);
}

.checkout-form h1,
.checkout-summary h2{

    margin-bottom: 25px;
}

.checkout-form input,
.checkout-form textarea{

    width: 100%;

    padding: 16px;

    margin-bottom: 18px;

    border: 1px solid #ddd;

    border-radius: 14px;

    font-family: inherit;
}

.checkout-form textarea{

    height: 120px;

    resize: none;
}

.checkout-button{

    width: 100%;

    padding: 18px;

    border: none;

    border-radius: 14px;

    background: black;

    color: white;

    font-weight: 600;

    cursor: pointer;
}

.checkout-product{

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 18px 0;

    border-bottom: 1px solid #eee;
}

.checkout-product h4{

    margin-bottom: 5px;
}

.checkout-product p{

    color: #777;

    font-size: 14px;
}

.checkout-total{

    display: flex;

    justify-content: space-between;

    margin-top: 25px;

    font-size: 20px;

    font-weight: 700;
}
.checkout-product-left{

    display:flex;
    flex-direction:column;
    gap:10px;
}

.checkout-quantity{

    display:flex;
    align-items:center;
    gap:12px;
}

.checkout-quantity button{

    width:32px;
    height:32px;

    border:none;
    border-radius:8px;

    background:#f3f3f3;

    cursor:pointer;
}

.remove-checkout-button{

    border:none;

    background:#ffe5e5;

    color:#d62828;

    padding:10px 14px;

    border-radius:10px;

    cursor:pointer;

    width:fit-content;
}


/* LUXURY CART + CHECKOUT LINE ITEMS */

.cart-lines {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 32px;
}

.cart-line {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto auto 42px;
    gap: 18px;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ece7df;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 14px 36px rgba(24, 24, 24, 0.05);
}

.cart-line-thumb {
    width: 76px;
    height: 76px;
    border-radius: 14px;
    background: #faf9f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-line-thumb img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.cart-line-info {
    min-width: 0;
}

.cart-line-name {
    color: #181818;
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 7px;
}

.cart-line-price {
    color: #777;
    font-size: 13px;
}

.cart-line-quantity {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e0d8;
    border-radius: 999px;
    padding: 0 8px;
    background: #fffdf8;
}

.cart-line-quantity button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #f4f0e8;
    color: #111;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.cart-line-quantity span {
    min-width: 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-line-subtotal {
    white-space: nowrap;
    font-size: 15px;
}

.remove-item {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #fff0f1;
    color: #d94b58;
    cursor: pointer;
}

.checkout-lines {
    margin-top: 18px;
}

.checkout-line {
    grid-template-columns: 68px minmax(0, 1fr) auto 42px;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
}

.checkout-line .cart-line-thumb {
    width: 58px;
    height: 58px;
}

.checkout-line .cart-line-name {
    font-size: 13px;
}

.checkout-line .cart-line-price,
.checkout-line .cart-line-subtotal {
    display: none;
}

.checkout-line .cart-line-quantity {
    height: 34px;
    gap: 8px;
}

.checkout-line .cart-line-quantity button {
    width: 23px;
    height: 23px;
}

.checkout-line .remove-item {
    width: 34px;
    height: 34px;
}

@media (max-width: 720px) {
    .cart-line {
        grid-template-columns: 68px minmax(0, 1fr) 38px;
        gap: 12px;
    }

    .cart-line-thumb {
        width: 62px;
        height: 62px;
    }

    .cart-line-quantity {
        grid-column: 2;
        justify-self: start;
        margin-top: 8px;
    }

    .cart-line-subtotal {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
    }

    .remove-item {
        grid-column: 3;
        grid-row: 1;
    }
}


/* FAVORITES LINE ITEMS */

.favorite-lines {
    max-width: 980px;
}

.favorite-line {
    grid-template-columns: 86px minmax(0, 1fr) auto 42px;
}

.favorite-line-cart {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 999px;
    background: #111;
    color: white;
    padding: 0 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.favorite-line-cart i {
    font-size: 13px;
}

@media (max-width: 720px) {
    .favorite-line {
        grid-template-columns: 68px minmax(0, 1fr) 38px;
    }

    .favorite-line-cart {
        grid-column: 2 / 4;
        justify-self: start;
        margin-top: 8px;
    }
}


/* HEADER DROPDOWNS */

.header-icons {
    position: relative;
}

.header-dropdown-wrap {
    position: relative;
}

.header-action {
    border: none;
    background: transparent;
    font-family: inherit;
    position: relative;
}

.header-count {
    position: absolute;
    top: -7px;
    right: 6px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #f35f6f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    padding: 0 5px;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #ece7df;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 22px 60px rgba(24, 24, 24, 0.13);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s;
    z-index: 100;
}

.header-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-head,
.header-dropdown-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-dropdown-head {
    margin-bottom: 12px;
}

.header-dropdown-head strong {
    font-size: 15px;
}

.header-dropdown-head a {
    color: #e85b63;
    font-size: 12px;
    font-weight: 600;
}

.header-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 330px;
    overflow: auto;
}

.header-dropdown-empty {
    color: #777;
    font-size: 13px;
    padding: 18px 4px;
    text-align: center;
}

.header-mini-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 34px;
    gap: 11px;
    align-items: center;
    border: 1px solid #f0ebe3;
    border-radius: 14px;
    background: #fffdf8;
    padding: 9px;
}

.header-cart-item {
    grid-template-columns: 56px minmax(0, 1fr) auto 34px;
}

.header-mini-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #f8f6f1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-mini-thumb img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.header-mini-info {
    min-width: 0;
}

.header-mini-info a {
    color: #111;
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 5px;
}

.header-mini-info span {
    color: #777;
    font-size: 12px;
}

.header-mini-qty {
    height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e5e0d8;
    border-radius: 999px;
    padding: 0 6px;
    background: white;
}

.header-mini-qty button,
.header-mini-remove {
    border: none;
    cursor: pointer;
}

.header-mini-qty button {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #f4f0e8;
}

.header-mini-qty span {
    min-width: 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.header-mini-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff0f1;
    color: #d94b58;
}

.header-dropdown-total {
    border-top: 1px solid #eee8dd;
    margin-top: 13px;
    padding-top: 13px;
    font-size: 14px;
}

.header-checkout-button {
    height: 42px;
    margin-top: 12px;
    border-radius: 999px;
    background: #111;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 760px) {
    .header-dropdown {
        right: -72px;
        width: 330px;
    }
}


/* RTL HEADER DROPDOWN POSITION */
html[dir="rtl"] .header-dropdown {
    left: 0;
    right: auto;
    text-align: right;
}

html[dir="rtl"] .header-dropdown::before {
    left: 22px;
    right: auto;
}


/* RTL HOME PRODUCT CARDS */
html[dir="rtl"] .card {
  text-align: right;
  padding-left: 170px;
  padding-right: 22px;
}

html[dir="rtl"] .card img {
  left: 0;
  right: auto;
}

html[dir="rtl"] .card p {
  width: 100%;
  max-width: 210px;
}

@media (max-width: 900px) {
  html[dir="rtl"] .card {
    padding-left: 145px;
  }

  html[dir="rtl"] .card img {
    width: 135px;
  }
}

/* =========================
   MOBILE APP EXPERIENCE
========================= */

.mobile-menu-button,
.mobile-bottom-nav,
.mobile-home-block,
.mobile-filter-toggle,
.mobile-grid-toggle {
    display: none;
}

@media (max-width: 760px) {
    body {
        background: #fff;
        padding-bottom: 82px;
    }

    .top-bar {
        height: 34px;
        padding: 0 14px;
        font-size: 10px;
        justify-content: center;
    }

    .top-bar > div:first-child {
        position: static;
        display: block;
        text-align: center;
        font-weight: 600;
    }

    .top-center,
    .top-right {
        display: none;
    }

    .main-header {
        min-height: 76px;
        padding: 10px 16px;
        gap: 10px;
        border-bottom: none;
    }

    .mobile-menu-button {
        display: inline-flex;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: #111;
        font-size: 20px;
        cursor: pointer;
        flex: 0 0 auto;
    }

    .logo {
        width: 156px;
        flex: 0 0 auto;
    }

    .search-container {
        flex: 0 0 auto;
        margin: 0 4px 0 auto;
        width: 34px;
        height: 34px;
    }

    .search-container input {
        position: absolute;
        right: 0;
        top: 42px;
        width: calc(100vw - 32px);
        height: 42px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-4px);
        transition: 0.2s ease;
        z-index: 40;
        background: #fff;
    }

    .search-container:focus-within input {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    }

    .search-container i {
        position: static;
        transform: none;
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #111;
        font-size: 18px;
    }

    .header-icons {
        gap: 6px;
        flex: 0 0 auto;
    }

    .header-icons > .icon-box,
    .header-dropdown-wrap:first-of-type {
        display: none;
    }

    .header-dropdown-wrap {
        position: static;
    }

    .header-action.icon-box {
        width: 34px;
        height: 34px;
        padding: 0;
        gap: 0;
    }

    .header-action.icon-box span {
        display: none;
    }

    .header-action.icon-box i {
        font-size: 20px;
    }

    .header-count {
        top: -3px;
        right: -4px;
    }

    .header-dropdown {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 116px;
        width: auto;
        max-width: none;
        z-index: 100;
    }

    .navbar {
        display: none;
        position: fixed;
        top: 110px;
        left: 16px;
        right: 16px;
        z-index: 80;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid #eee;
        border-radius: 18px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    }

    .navbar.is-mobile-open {
        display: flex;
    }

    .navbar a {
        padding: 14px 12px;
        border-bottom: 1px solid #f2f2f2;
    }

    .navbar a:last-child {
        border-bottom: none;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        height: 70px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid #eeeeee;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.06);
        backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #111;
        font-size: 10px;
        min-width: 0;
    }

    .mobile-bottom-nav i {
        font-size: 18px;
    }

    .mobile-bottom-nav .is-active {
        color: #f45261;
    }

    .hero-section {
        padding: 0 16px 16px;
    }

    .hero-content {
        min-height: 232px;
        border-radius: 14px;
        padding: 24px 18px;
        align-items: center;
        background: #eef2e6;
        position: relative;
    }

    .hero-text {
        width: 48%;
        position: relative;
        z-index: 2;
    }

    .hero-small,
    .hero-description,
    .btn-secondary {
        display: none;
    }

    .hero-text h1 {
        font-size: 20px;
        line-height: 1.35;
        margin-bottom: 20px;
        font-weight: 600;
    }

    .hero-text h1 span {
        color: inherit;
    }

    .btn-primary {
        height: 44px;
        padding: 0 18px;
        border-radius: 12px;
        background: #111;
        color: white;
        font-size: 11px;
        text-transform: uppercase;
    }

    .hero-image {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 66%;
        transform: none;
    }

    .hero-image img {
        height: 232px;
        object-fit: contain;
        object-position: right bottom;
    }

    .features,
    .cards-section {
        display: none;
    }

    .mobile-home-block {
        display: block;
    }

    .mobile-feature-strip {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 18px 16px 22px;
    }

    .mobile-feature-strip div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
        font-size: 10px;
        line-height: 1.45;
    }

    .mobile-feature-strip i {
        font-size: 22px;
        color: #222;
    }

    .mobile-home-section {
        padding: 0 16px 28px;
    }

    .mobile-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .mobile-section-head h2 {
        font-size: 20px;
    }

    .mobile-section-head a {
        font-size: 12px;
    }

    .mobile-horizontal-products {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 46%;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
    }

    .mobile-product-card {
        position: relative;
        min-height: 260px;
        border: 1px solid #eeeeee;
        border-radius: 14px;
        background: white;
        padding: 12px;
        scroll-snap-align: start;
    }

    .mobile-card-heart {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 50%;
        background: white;
        font-size: 15px;
        z-index: 2;
    }

    .mobile-card-image {
        height: 130px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
    }

    .mobile-card-image img {
        max-width: 88%;
        max-height: 124px;
        object-fit: contain;
    }

    .mobile-card-body p {
        color: #777;
        font-size: 9px;
        text-transform: uppercase;
        margin-bottom: 5px;
    }

    .mobile-card-body a {
        display: block;
        color: #111;
        font-size: 11px;
        line-height: 1.35;
        font-weight: 600;
        min-height: 34px;
        margin-bottom: 7px;
    }

    .mobile-card-body span {
        display: block;
        color: #555;
        font-size: 10px;
        margin-bottom: 8px;
    }

    .mobile-card-body i {
        color: #ffb400;
    }

    .mobile-card-body strong {
        font-size: 14px;
    }

    .mobile-card-cart {
        position: absolute;
        right: 10px;
        bottom: 10px;
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 50%;
        background: var(--green);
        color: #111;
    }

    .mobile-delivery-note {
        margin: 0 16px 28px;
        border-radius: 12px;
        background: #eef8d7;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 12px;
        line-height: 1.5;
    }

    .mobile-delivery-note i {
        font-size: 26px;
    }

    .mobile-category-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .mobile-category-tile {
        text-align: center;
        font-size: 11px;
        font-weight: 500;
    }

    .mobile-category-tile img {
        aspect-ratio: 1;
        object-fit: contain;
        border-radius: 12px;
        background: #f8f1ea;
        padding: 10px;
        margin-bottom: 8px;
    }

    .mobile-new-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    html[dir="rtl"] .hero-image {
        left: 0;
        right: auto;
    }

    html[dir="rtl"] .hero-image img {
        object-position: left bottom;
    }

    html[dir="rtl"] .mobile-card-heart {
        left: 10px;
        right: auto;
    }

    html[dir="rtl"] .mobile-card-cart {
        left: 10px;
        right: auto;
    }
}

@media (max-width: 760px) {
    .mobile-horizontal-products {
        direction: ltr;
        max-width: 100%;
        overscroll-behavior-x: contain;
    }

    html[dir="rtl"] .mobile-product-card,
    html[dir="rtl"] .mobile-section-head,
    html[dir="rtl"] .mobile-delivery-note,
    html[dir="rtl"] .mobile-category-grid {
        direction: rtl;
    }

    html[dir="rtl"] .search-container input {
        left: auto;
        right: 0;
    }
}

@media (max-width: 760px) {
    .search-container input,
    html[dir="rtl"] .search-container input {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 86px;
        width: auto;
    }

    .mobile-horizontal-products {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        max-width: calc(100vw - 32px);
    }

    .mobile-horizontal-products .mobile-product-card {
        flex: 0 0 calc((100vw - 56px) * 0.46);
    }
}

@media (max-width: 760px) {
    .mobile-language-switcher {
        display: inline-flex;
        flex: 0 0 auto;
        padding: 2px;
        gap: 2px;
        background: #f8f8f8;
        border-color: #eeeeee;
    }

    .mobile-language-switcher .language-option {
        min-width: 30px;
        height: 22px;
        padding: 0 7px;
        font-size: 10px;
    }

    .main-header > .mobile-language-switcher {
        margin-left: auto;
    }

    .main-header > .mobile-language-switcher + .search-container {
        margin-left: 0;
    }

    html[dir="rtl"] .main-header > .mobile-language-switcher {
        margin-left: 0;
        margin-right: auto;
    }
}


@media (max-width: 760px) {
    .main-header {
        direction: ltr;
    }

    .mobile-home-section {
        overflow: hidden;
    }

    .mobile-horizontal-products {
        contain: layout paint;
    }
}

@media (max-width: 760px) {
    html[dir="rtl"] .main-header,
    .main-header {
        direction: ltr;
        position: relative;
    }

    .main-header > .mobile-language-switcher,
    html[dir="rtl"] .main-header > .mobile-language-switcher {
        position: absolute;
        top: -28px;
        right: 12px;
        left: auto;
        margin: 0;
        z-index: 45;
    }
}

/* =========================
   REFINED CHECKOUT FLOW
========================= */

.checkout-page {
    padding: 42px 6% 80px;
    background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
}

.checkout-container {
    width: min(1040px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.checkout-summary,
.checkout-form {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #eee7dc;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 48px rgba(20, 20, 20, 0.06);
}

.checkout-section-heading {
    margin-bottom: 22px;
}

.checkout-section-heading span {
    display: inline-flex;
    align-items: center;
    height: 26px;
    border-radius: 999px;
    background: #eef8d7;
    color: #111;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.checkout-section-heading h1 {
    color: #111;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 8px;
}

.checkout-section-heading p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.checkout-summary h2,
.checkout-form h1 {
    margin-bottom: 0;
}

.checkout-lines {
    margin-top: 0;
}

.checkout-line {
    grid-template-columns: 82px minmax(0, 1fr) auto auto 40px;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #fffdf9;
}

.checkout-line .cart-line-thumb {
    width: 72px;
    height: 72px;
}

.checkout-line .cart-line-name {
    font-size: 15px;
}

.checkout-line .cart-line-price,
.checkout-line .cart-line-subtotal {
    display: inline-flex;
}

.checkout-line .cart-line-subtotal {
    color: #111;
    font-size: 15px;
    font-weight: 700;
}

.checkout-line .cart-line-quantity {
    height: 38px;
    gap: 10px;
}

.checkout-line .cart-line-quantity button {
    width: 26px;
    height: 26px;
}

.checkout-line .remove-item {
    width: 38px;
    height: 38px;
}

.checkout-total {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #111;
    color: #fff;
    font-size: 18px;
}

.checkout-total strong {
    color: #fff;
    font-size: 22px;
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}

.checkout-form .checkout-section-heading,
.checkout-form textarea,
.checkout-form .checkout-button {
    grid-column: 1 / -1;
}

.checkout-form input,
.checkout-form textarea {
    background: #fffdf9;
    border: 1px solid #e8e0d6;
    border-radius: 14px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: #d9ef7a;
    box-shadow: 0 0 0 4px rgba(217, 239, 122, 0.28);
    outline: none;
}

.checkout-button {
    height: 54px;
    border-radius: 14px;
    background: #f45261;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    .checkout-page {
        padding: 8px 16px 96px;
    }

    .checkout-summary,
    .checkout-form {
        border-radius: 18px;
        padding: 18px;
    }

    .checkout-section-heading h1 {
        font-size: 23px;
    }

    .checkout-line {
        grid-template-columns: 64px minmax(0, 1fr) 38px;
        gap: 12px;
    }

    .checkout-line .cart-line-thumb {
        width: 58px;
        height: 58px;
    }

    .checkout-line .cart-line-quantity {
        grid-column: 2;
        justify-self: start;
        margin-top: 8px;
    }

    .checkout-line .cart-line-subtotal {
        grid-column: 2;
        justify-self: start;
        margin-top: 3px;
    }

    .checkout-line .remove-item {
        grid-column: 3;
        grid-row: 1;
    }

    .checkout-form {
        grid-template-columns: 1fr;
    }
}

/* DESKTOP CHECKOUT RESTORE */
@media (min-width: 761px) {
    .checkout-container {
        width: min(1180px, 100%);
        grid-template-columns: 1.2fr 0.8fr;
        align-items: start;
        gap: 40px;
    }

    .checkout-form {
        order: 1;
    }

    .checkout-summary {
        order: 2;
    }

    .checkout-summary,
    .checkout-form {
        padding: 30px;
        border-radius: 24px;
    }

    .checkout-summary {
        position: sticky;
        top: 24px;
    }

    .checkout-line {
        grid-template-columns: 64px minmax(0, 1fr) auto 38px;
        gap: 12px;
    }

    .checkout-line .cart-line-thumb {
        width: 58px;
        height: 58px;
    }

    .checkout-line .cart-line-name {
        font-size: 13px;
    }

    .checkout-line .cart-line-price,
    .checkout-line .cart-line-subtotal {
        display: none;
    }

    .checkout-line .cart-line-quantity {
        height: 34px;
        gap: 8px;
    }

    .checkout-line .cart-line-quantity button {
        width: 23px;
        height: 23px;
    }

    .checkout-line .remove-item {
        width: 34px;
        height: 34px;
    }
}

/* SEARCH + ACCOUNT */
.search-container {
    z-index: 70;
}

.search-suggestions-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    display: none;
    max-height: 420px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #eee7dc;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.13);
}

.search-suggestions-panel.is-open {
    display: block;
}

.search-suggestion {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
}

.search-suggestion:hover {
    background: #faf8f4;
}

.search-suggestion-image {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f8f1ea;
}

.search-suggestion-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.search-suggestion-copy {
    min-width: 0;
}

.search-suggestion-copy strong,
.search-suggestion-copy small {
    display: block;
}

.search-suggestion-copy strong {
    color: #111;
    font-size: 13px;
    line-height: 1.35;
}

.search-suggestion-copy small {
    color: #777;
    font-size: 12px;
    margin-top: 3px;
}

.search-suggestion b {
    white-space: nowrap;
    font-size: 13px;
}

.search-empty {
    color: #777;
    padding: 16px;
    font-size: 13px;
}

.account-button {
    border: none;
    background: transparent;
    font-family: inherit;
}

.account-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 17, 17, 0.38);
    backdrop-filter: blur(8px);
}

.account-modal-backdrop.is-open {
    display: flex;
}

.account-modal {
    width: min(460px, 100%);
    position: relative;
    border-radius: 24px;
    background: #fffdf9;
    border: 1px solid #eee7dc;
    padding: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.18);
}

.account-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f4f0e8;
    cursor: pointer;
}

.account-head span {
    display: inline-flex;
    height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    background: #eef8d7;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.account-head h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.account-head p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.account-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 22px 0;
    padding: 4px;
    border-radius: 999px;
    background: #f5f1e9;
}

.account-tabs button {
    height: 40px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-tabs button.is-active {
    background: #111;
    color: white;
}

.account-form {
    display: grid;
    gap: 12px;
}

.account-form.is-hidden {
    display: none;
}

.account-form input {
    height: 48px;
    border: 1px solid #e8e0d6;
    border-radius: 14px;
    background: white;
    padding: 0 14px;
    font-family: inherit;
}

.account-form button {
    height: 50px;
    border: none;
    border-radius: 14px;
    background: #f45261;
    color: white;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.account-status,
.checkout-order-status {
    margin-top: 14px;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f5f1e9;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.account-status:empty {
    display: none;
}

.account-status[data-type="error"],
.checkout-order-status[data-type="error"] {
    background: #fff0f1;
    color: #c92d3b;
}

.account-status[data-type="success"],
.checkout-order-status[data-type="success"] {
    background: #eef8d7;
    color: #2f6d35;
}

.checkout-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 760px) {
    .search-suggestions-panel {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 132px;
    }

    .search-suggestion {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .search-suggestion b {
        grid-column: 2;
    }
}


.account-auth-view.is-hidden,
.account-dashboard.is-hidden {
    display: none;
}

.account-dashboard {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.account-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7f4, #f2f8df);
}

.account-welcome small,
.account-panel h3 b,
.account-mini-item small,
.account-order small {
    display: block;
    color: #777;
    font-size: 12px;
    font-weight: 500;
}

.account-welcome strong {
    display: block;
    margin-top: 2px;
    font-size: 19px;
}

.account-logout,
.account-panel-link {
    border: none;
    border-radius: 999px;
    background: #111;
    color: white;
    padding: 10px 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.account-stats span {
    border: 1px solid #eee7dc;
    border-radius: 16px;
    background: white;
    padding: 12px;
    text-align: center;
}

.account-stats strong {
    display: block;
    font-size: 20px;
}

.account-stats small {
    display: block;
    color: #777;
    font-size: 11px;
}

.account-panel {
    border: 1px solid #eee7dc;
    border-radius: 18px;
    background: white;
    padding: 14px;
}

.account-panel h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
}

.account-mini-list,
.account-orders {
    display: grid;
    gap: 10px;
}

.account-mini-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.account-mini-item img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: #faf7f1;
}

.account-mini-item strong {
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.account-empty {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.account-panel-link {
    display: inline-flex;
    margin-top: 12px;
    background: #f45261;
}

.account-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0ebe3;
}

.account-order:last-child {
    border-bottom: 0;
}

.account-order strong {
    font-size: 13px;
}

.account-order b {
    white-space: nowrap;
}

.product-stock-note {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 8px 0 4px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef8d7;
    color: #4c6f18;
    font-size: 12px;
    font-weight: 800;
}

.product-stock-note[data-stock="empty"] {
    background: #fff0f1;
    color: #c92d3b;
}

.add-cart-button.is-disabled,
.product-cart.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .account-modal {
        max-height: 88vh;
        overflow: auto;
        padding: 22px;
    }

    .account-welcome {
        align-items: flex-start;
        flex-direction: column;
    }
}


.account-stats a {
    display: block;
    border: 1px solid #eee7dc;
    border-radius: 16px;
    background: white;
    padding: 12px;
    text-align: center;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-stats a:hover {
    transform: translateY(-2px);
    border-color: #d9ef7a;
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.account-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.account-panel-link.secondary {
    background: #111;
}

.account-panel h3 a {
    color: #f45261;
    font-size: 12px;
    text-decoration: none;
}

.account-order {
    color: inherit;
    text-decoration: none;
}

.account-mini-item:hover strong,
.account-order:hover strong,
.account-panel h3 a:hover {
    color: #f45261;
}

.orders-history-page {
    max-width: 1040px;
}

.orders-history-intro {
    margin-top: -16px;
    color: #666;
    line-height: 1.7;
}

.orders-history-list {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.orders-history-empty {
    border: 1px solid #eee7dc;
    border-radius: 18px;
    background: #fffdf9;
    padding: 24px;
    color: #666;
}

.orders-history-card {
    border: 1px solid #eee7dc;
    border-radius: 20px;
    background: #fffdf9;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.05);
}

.orders-history-head {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 18px;
    border: none;
    background: transparent;
    padding: 18px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.orders-history-head strong,
.orders-history-product strong {
    display: block;
    font-size: 15px;
}

.orders-history-head small,
.orders-history-product small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

.orders-history-head b {
    white-space: nowrap;
}

.orders-history-head i {
    transition: transform 0.2s ease;
}

.orders-history-card.is-open .orders-history-head i {
    transform: rotate(180deg);
}

.orders-history-body {
    display: none;
    border-top: 1px solid #f0ebe3;
    padding: 12px 18px 18px;
}

.orders-history-card.is-open .orders-history-body {
    display: grid;
    gap: 12px;
}

.orders-history-product {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.orders-history-product img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 14px;
    background: #faf7f1;
}

.orders-history-product:hover strong {
    color: #f45261;
}

@media (max-width: 760px) {
    .orders-history-head {
        grid-template-columns: minmax(0, 1fr) 20px;
    }

    .orders-history-head b {
        grid-column: 1;
        grid-row: 2;
    }

    .orders-history-head i {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}
