/* Global Theme */
:root {
  --primary: #8B1E1E;
  --primary-dark: #741818;
  --cream: #ffffff;
  --text: #1a1a1a;
  --muted: #666;

  --radius: 18px;
  --shadow: 0 14px 30px rgba(0, 0, 0, .10);
  --border: 1px solid rgba(0, 0, 0, .06);

  --arrowSize: 42px;
  --arrowGap: 14px;
}

/* Base Typography */
body {
  background: var(--cream);
  color: var(--text);
  font-family: "Viga", sans-serif;
}

.font-title,
h1, h2, h3, h4, h5, h6 {
  font-family: "Calistoga", serif;
  letter-spacing: 0.3px;
}

/* Layout */
.ott-container {
  max-width: 1440px;
  padding-left: 50px !important;
  padding-right: 50px !important;
}

/* Helpers */
.text-ott { color: var(--primary) !important; }
.bg-ott { background: var(--primary) !important; }
.border-ott { border-color: rgba(139, 30, 30, .35) !important; }

/* Buttons */
.btn-ott {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
  padding: 0.55rem 1.05rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 8px 18px rgba(139, 30, 30, .18);
}

.btn-ott:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-ott-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 800;
  border-radius: 10px;
  padding: 0.55rem 1.05rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-ott-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Navbar Base */
.ott-navbar {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

/* Brand Navbar */
.ott-brand {
  padding: 0;
  margin-right: 0;
}

.ott-logo {
  height: 46px;
  width: auto;
}


/* Menu Navbar */
.ott-navlink {
  color: var(--primary) !important;
  font-weight: 1000;
  text-transform: capitalize;
  font-size: 1.25rem;
}

.ott-navlink:hover {
  color: var(--primary-dark) !important;
}

/* Icon Navbar */
.icon-btn {
  color: var(--primary);
  font-size: 1.25rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--primary-dark);
  transform: scale(1.12);
}

.icon-btn:active {
  transform: scale(0.93);
}

/* Toggler Navbar */
.ott-toggler {
  border-color: rgba(0, 0, 0, .15);
}

/* Dropdown Profile */
.ott-dd .dropdown-toggle::after {
  display: none; /* Hidden Arrow */
}

.ott-dd-menu {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
  padding: .45rem;
  min-width: 180px;
}

.ott-dd-item {
  font-weight: 800;
  color: var(--primary);
  border-radius: 10px;
  padding: .55rem .75rem;
}

.ott-dd-item:hover {
  background: rgba(139, 30, 30, .08);
  color: var(--primary-dark);
}

.ott-dd-divider {
  margin: .35rem 0;
}

/* Teks The Ottoman (Kiri) */
.ott-left-title {
  color: var(--primary) !important;
  font-weight: 1000;
  text-transform: capitalize;
  font-size: 1.25rem; 
  text-decoration: none;
  line-height: 1;
}

.ott-left-title:hover {
  color: var(--primary-dark) !important;
}

/* Hover Menu Animasi + Underline */
.ott-navlink {
  position: relative;
  display: inline-block;
  transition: transform .22s ease, color .22s ease;
}

/* Underline */
.ott-navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;              
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease, background .22s ease;
}

/* Hover Animasi Teks Gerak & Underline */
.ott-navlink:hover {
  transform: translateY(-2px);
  color: var(--primary-dark) !important;
}

.ott-navlink:hover::after {
  transform: scaleX(1);
  background: var(--primary-dark);
}

/* Saat Active Page */
.ott-navlink.active {
  color: var(--primary-dark) !important;
}

.ott-navlink.active::after {
  transform: scaleX(1);
  background: var(--primary-dark);
}

/* ===============================
   CART BADGE 
================================ */
.cart-badge-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-count{
  position: absolute;
  top: -13px;
  right: -17px;
  height: 20px;
  min-width: 20px; 
  padding: 0 7px;       
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  white-space: nowrap;
  pointer-events: none;
}

.icon-btn{
  text-decoration: none !important;
}

.icon-btn::after{
  content: none !important;
}


/* Desktop */
@media (min-width: 992px) {
  /* Container 3 Column Kiri(1fr) - Tengah (Auto) - Kanan(1fr) */
  .ott-navbar-fixcenter .ott-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  /* Toggler + Mobile */
  .ott-navbar-fixcenter .navbar-toggler {
    grid-column: 1;
    justify-self: start;
  }

  /* Menu View Center Fix */
  .ott-navbar-fixcenter .navbar-collapse,
  .ott-navbar-fixcenter .offcanvas-lg {
    grid-column: 2;
    justify-self: center;
    width: auto;
  }

  .ott-navbar-fixcenter .ott-menu {
    margin: 0 !important;
  }

  /* Icon View Right Fix */
  .ott-navbar-fixcenter .ott-icons {
    grid-column: 3;
    justify-self: end;
    margin-left: 0 !important;
  }
}

/* Responsive */
@media (max-width: 991px) {
  .ott-container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .ott-menu {
    padding-top: 10px;
  }

  .ott-navlink {
    font-size: 1.1rem;
  }

  .ott-logo {
    height: 40px;
  }

  .navbar-collapse {
    padding-top: 10px;
  }

  .ott-menu .nav-link {
    padding: 10px 0;
  }

  .ott-navbar-fixcenter .ott-container {
    display: flex;
    align-items: center;
  }

  .ott-navbar-fixcenter .navbar-collapse {
    width: 100%;
  }
  
  /* Offcanvas Sidebar Drawer (Left Side) Styling */
  .offcanvas-lg.offcanvas-start {
    width: 300px !important;
    background-color: #ffffff !important;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.08) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  .offcanvas-lg.offcanvas-start .offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .offcanvas-lg.offcanvas-start .offcanvas-body {
    padding: 1.5rem;
  }

  .offcanvas-lg.offcanvas-start .ott-menu {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1.25rem !important;
    padding-top: 0.5rem;
  }

  .offcanvas-lg.offcanvas-start .btn-close {
    box-shadow: none !important;
    transition: transform 0.2s ease;
  }

  .offcanvas-lg.offcanvas-start .btn-close:hover {
    transform: scale(1.1);
  }
  
  /* Icons Fix Right */
  .ott-navbar-fixcenter .ott-icons {
    margin-left: auto !important; 
    gap: 1.10rem !important; /* Sleek gap on tablet */
  }

  .icon-btn {
    font-size: 1.10rem;
  }

  .cart-count {
    top: -9px;
    right: -12px;
    height: 17px;
    min-width: 17px;
    padding: 0 4px;
    font-size: 0.55rem;
  }

  .ott-navbar .btn-ott,
  .offcanvas-lg .btn-ott {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
  }

  .navbar-toggler.ott-toggler {
    padding: 6px 8px !important;
    border-radius: 8px !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }
  .navbar-toggler.ott-toggler .navbar-toggler-icon {
    width: 1.15em !important;
    height: 1.15em !important;
  }

  /* Hide the toggle button when offcanvas sidebar drawer is open */
  .ott-navbar:has(#ottNav.show) .ott-toggler {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.8);
  }
}

@media (max-width: 575px) {
  .ott-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .ott-logo {
    height: 32px; /* Slightly smaller logo for better fit */
  }

  .ott-navlink {
    font-size: 1.02rem;
  }

  .icon-btn {
    font-size: 0.95rem !important; /* Even smaller and sleeker globe icon */
  }

  .ott-navbar-fixcenter .ott-icons {
    gap: 0.75rem !important; /* Tighter layout for mobile screens */
  }

  .ott-menu .nav-link {
    padding: 9px 0;
  }

  .navbar-toggler.ott-toggler {
    padding: 4px 6px !important; /* Sleek and small toggler border */
    border-radius: 6px !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
  }
  .navbar-toggler.ott-toggler .navbar-toggler-icon {
    width: 0.95em !important;
    height: 0.95em !important;
  }

  .ott-navbar .btn-ott,
  .offcanvas-lg .btn-ott {
    padding: 0.3rem 0.65rem !important; /* Sleek small button on mobile */
    font-size: 0.70rem !important;
    border-radius: 6px !important;
    letter-spacing: 0.3px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 10px rgba(139, 30, 30, .12) !important;
  }

  /* Cart Count */
  .cart-count {
    top: -7px !important;
    right: -9px !important;
    height: 14px !important;
    min-width: 14px !important;
    padding: 0 3px !important;
    font-size: 0.50rem !important;
    border-width: 1.5px !important;
  }
}
