/* =========================================================
   Simple 5-Star Rating (no icon font)
   ========================================================= */
.rate {
  display: inline-block;
  position: relative;
  border: 0;
  font-size: 0;               /* remove inline gaps */
  direction: rtl;             /* lets ~ select “previous” stars visually */
  user-select: none;
}

.rate input {
  position: absolute;
  left: -9999px;              /* fully hide radios */
}

.rate label {
  float: right;               /* float handles layout, inline-block not needed */
  cursor: pointer;
  position: relative;
  width: 1.1rem;              /* star box */
  height: 1.1rem;
  margin: 0 2px;
  line-height: 1.1rem;
  transition: transform .08s ease-in-out;
}

/* empty star */
.rate label::before {
  content: "★";
  font-size: 1rem;            /* star size (compact) */
  color: #c5c8ce;             /* light grey outline look */
}

/* hover + checked fill */
.rate input:checked ~ label::before,
.rate label:hover ~ label::before,
.rate label:hover::before {
  color: #222;
}

/* subtle hover feel */
.rate label:hover { 
  transform: scale(1.04); 
}

/* tighter vertical rhythm when used inline */
.rate-5 { 
  margin-top: 2px; 
}


/* =========================================================
   Product Detail (gallery + thumbs, Amazon-like)
   ========================================================= */
.prod-figure { 
  border-radius: 10px; 
}

.prod-main {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;          /* desktop height */
}

.prod-main img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 6px;
}

/* Thumbnails strip */
.prod-thumbs { 
  margin: .5rem 0 0; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px; 
}

.prod-thumbs .thumb,
.thumb-img {                     /* .thumb-img kept for older markup */
  width: 78px;
  height: 78px;
  object-fit: cover;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .1s ease, border-color .15s ease, box-shadow .15s ease;
}

.prod-thumbs .thumb:hover,
.thumb-img:hover {
  transform: translateY(-1px);
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.prod-thumbs .thumb.active,
.thumb-img.active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,.25);
}

/* Star colors for read-only displays */
.rating-star .fas.fa-star,
.rating-star .fas.fa-star-half-alt { 
  color: #da9a05; 
}

.rating-star .far.fa-star { 
  color: #c5c8ce; 
}

/* Mobile tweaks */
@media (max-width: 767.98px) {
  .prod-main { 
    min-height: 300px; 
  }
}


/* =========================================================
   Compact small <select> (used for “Select Size”)
   ========================================================= */
.plain-select-sm {
  display: inline-block;
  min-width: 140px;               /* width control */
  height: 32px;                   /* smaller height */
  padding: 2px 28px 2px 8px;      /* compact padding */
  font-size: 0.9rem;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  line-height: 1.2;
  background:
    #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='gray'><path d='M7 10l5 5 5-5z'/></svg>")
    no-repeat right 8px center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.plain-select-sm:focus {
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(13,110,253,.15);
}


/* =========================
   Drawer Modal (Bootstrap 4) - LEFT SIDE (Kirei-like)
========================= */
.modal-dialog-drawer{
  position: fixed;
  margin: 0;
  left: 0;                 /* ✅ left side */
  right: auto;
  top: 0;
  height: 100%;
  width: 92%;
  max-width: 380px;        /* drawer width */
  transform: translateX(-100%);
  transition: transform .25s ease-out;
}

.modal.show .modal-dialog-drawer{
  transform: translateX(0);
}

.drawer-content{
  height: 100%;
  border-radius: 0;
}

.drawer-body{
  overflow-y: auto;
}

/* Mobile: still LEFT full height (no bottom drawer) */
@media (max-width: 767.98px){
  .modal-dialog-drawer{
    width: 86%;
    max-width: 360px;
  }
}


/* =========================
   Drawer UI (menu list + support card like screenshot)
========================= */

/* Drawer header close button style */
#mobileMenu .modal-header{
  border-bottom: 0;
  padding: 14px 16px;
}

#mobileMenu .modal-title{
  font-weight: 700;
  font-size: 16px;
}

/* Drawer body spacing */
#mobileMenu .drawer-body{
  padding: 8px 16px 18px;
}

/* Support card */
.drawer-support{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  margin-bottom: 14px;
}

.drawer-support:hover{
  text-decoration: none;
  color: #111;
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
}

.drawer-support .support-ico{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #111;        /* ✅ ring like screenshot */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-support .support-ico i{
  font-size: 18px;
  color: #111;
}

.drawer-support .support-meta{
  line-height: 1.1;
}

.drawer-support .support-title{
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.drawer-support .support-number{
  font-size: 14px;
  font-weight: 800;
  margin: 2px 0 0;
}

/* Menu list items like screenshot */
.drawer-menu{
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(0,0,0,.06);
}

.drawer-menu li{
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.drawer-menu a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

.drawer-menu a:hover{
  text-decoration: none;
  background: rgba(0,0,0,.02);
}

/* Auth buttons row */
.drawer-auth{
  display: flex;
  gap: 12px;
  margin: 18px 0 14px;
}

.drawer-auth .btn{
  flex: 1;
  border-radius: 10px;
  font-weight: 700;
}

/* Social icons row */
.drawer-social{
  display: flex;
  gap: 12px;
  justify-content: center;
}

.drawer-social a{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
}


/* =========================
   Mobile sticky cart button
========================= */
.mobile-sticky-cart{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(0,0,0,.06);
  z-index: 1050;
}

.mobile-sticky-cart-btn{
  border-radius: 14px;
  font-weight: 700;
}

/* Prevent footer overlap on mobile */
@media (max-width: 767.98px){
  body{ padding-bottom: 84px; }
}


/* =========================
   Mobile Header: Auth + Cart Fix
========================= */
.header-actions{
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-box{
  line-height: 1.1;
  text-align: right;
}

.auth-greet{
  font-size: 12px;
  color: #6c757d;
}

.auth-links a{
  font-size: 14px;
  font-weight: 600;
}

/* Mobile specific */
@media (max-width: 575.98px){
  .header-actions{
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .auth-box{
    text-align: left;
    max-width: calc(100% - 56px);
  }

  .auth-links a{
    font-size: 13px;
  }

  .cart-icon{
    width: 40px !important;
    height: 40px !important;
  }
}



/* =========================
   Prevent Floating Buttons Overlap (Mobile)
========================= */
@media (max-width: 767.98px){
  .whatsapp_float{
    bottom: 92px !important;
  }

  .messenger_float{
    bottom: 150px !important;
  }
}

/* =========================
   Fix: Auth + Cart (Mobile) one-line clean
========================= */
@media (max-width: 575.98px){
  .header-actions{
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  .auth-box,
  .auth-links{
    white-space: nowrap;
  }
  .auth-box{
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* =========================
   Fix: Sticky cart + footer + floating buttons spacing
========================= */
@media (max-width: 767.98px){
  /* Footer + sticky cart safe space */
  body{ padding-bottom: 150px !important; }

  /* Lift floating buttons higher */
  .whatsapp_float{ bottom: 150px !important; }
  .messenger_float{ bottom: 210px !important; }
}





