/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
  --primary-red: #e60012;
  --primary-red-hover: #c40010;
  --bg-light: #f5f5f7;
  --text-dark: #111111;
  --text-muted: #666666;
  --border-color: #d1d5db;
  --footer-bg: #0b131f;
  --card-radius: 12px;
}

.retailer-portal {
  font-family: "DM Sans", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  overflow-x: hidden;
}

.retailer-portal * {
  box-sizing: border-box;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.portal-header {
  background: #f5f5f7; /* Off-white background from target design */
  padding: 25px 50px;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 998;
}

/* Dynamic Sticky State (When scrolling UP) */
.portal-header.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  animation: slideDown 0.3s ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Header Top Layout */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary-red);
}

.nav-divider {
  color: #000;
  font-size: 14px;
}

/* =========================================================
   USER GREETING & DROPDOWN
========================================================= */

.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting-text {
  font-size: 11px;
  color: #333;
  font-weight: 500;
}

/* Dropdown wrapper */
.user-dropdown {
  position: relative;
}

/* User pill */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 4px 9px;
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-dark);
  text-transform: capitalize;
  cursor: pointer;
  font-family: inherit;
}

/* Remove default button styling */
.user-badge {
  appearance: none;
  -webkit-appearance: none;
}

/* User icon */
.user-icon {
  display: flex;
  align-items: center;
}

.user-icon img {
  width: 25px;
  height: 25px;
  display: block;
}

/* Username */
.user-name {
  white-space: nowrap;
}

/* Arrow */
.user-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  color: #333;
  transition: transform 0.2s ease;
}

.user-arrow svg {
  width: 12px;
  height: 12px;
  display: block;
}

.user-dropdown:hover .user-arrow {
  transform: rotate(180deg);
}

/* =========================================================
   DROPDOWN MENU
========================================================= */

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

/* Show dropdown on hover */
.user-dropdown:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Logout link */
.user-dropdown-menu a {
  display: block;
  padding: 9px 12px;

  color: #333;
  text-decoration: none;

  font-size: 13px;
  font-weight: 500;

  border-radius: 5px;

  transition: background-color 0.2s ease, color 0.2s ease;
}

.user-dropdown-menu a:hover {
  background: #f5f5f5;
  color: #d71920;
}

/* Filter Bar Section (Right-aligned) */
.filter-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  position: relative;
}

.filter-divider {
  height: 1px;
  width: 41.7%;
  background-color: #d1d5db;
  position: absolute;
  top: -10px;
  right: 0;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-group label {
  font-size: 13px;
  font-weight: 500;
  color: #000;
  white-space: nowrap;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  width: 230px;
}

.input-wrapper input {
  border: none;
  padding: 8px 12px;
  outline: none;
  font-size: 11px;
  width: 100%;
}

.input-wrapper input::placeholder {
  color: #999;
}

.search-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  color: #666;
}

.dropdown-group select {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  outline: none;
  min-width: 80px;
}

/* =========================================================
   DROPDOWN MENU — RETAILER TIER ROW
========================================================= */

.user-dropdown-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 9px 12px;

  border-bottom: 1px solid var(--border-color);

  font-size: 13px;
  color: #333;

  cursor: default;
  white-space: nowrap;
}

.user-dropdown-tier:hover {
  background: transparent;
}

.user-dropdown-tier-label {
  font-size: 11px;
  font-weight: 500;
  color: #888;

  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-dropdown-tier-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: #222;
}

.user-dropdown-tier-value strong {
  font-weight: 600;
  color: var(--text-dark);
}

.user-dropdown-tier-dot {
  display: inline-block;

  width: 9px;
  height: 9px;

  border-radius: 50%;
  flex-shrink: 0;
}

.user-dropdown-tier-discount {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;

  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #222;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* =========================================================
   MOBILE OFF-CANVAS
========================================================= */

.mobile-offcanvas {
  position: fixed;
  top: 0;
  right: 0;

  width: min(320px, 85vw);
  height: 100vh;

  background: #fff;

  z-index: 10002;

  transform: translateX(100%);
  transition: transform 0.3s ease;

  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.12);

  overflow-y: auto;
}

.mobile-offcanvas.active {
  transform: translateX(0);
}

/* =========================================================
   OVERLAY
========================================================= */

.mobile-menu-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  z-index: 10001;

  opacity: 0;
  visibility: hidden;

  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   OFF-CANVAS HEADER
========================================================= */

.mobile-offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 22px 20px;

  border-bottom: 1px solid #eee;

  font-size: 18px;
  font-weight: 600;
}

.mobile-menu-close {
  border: none;
  background: transparent;

  width: 36px;
  height: 36px;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;

  color: #333;
}

/* =========================================================
   MOBILE NAVIGATION
========================================================= */

.mobile-nav {
  display: flex;
  flex-direction: column;

  padding: 15px 20px;
}

.mobile-nav a {
  display: block;

  padding: 16px 5px;

  color: #222;
  text-decoration: none;

  font-size: 15px;
  font-weight: 500;

  border-bottom: 1px solid #eee;

  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--primary-red);
}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */

@media (max-width: 991px) {
  .portal-header {
    padding: 15px 20px;
  }

  .header-top {
    margin-bottom: 0;
  }

  .brand-section {
    gap: 0;
  }

  .logo img {
    height: 38px;
  }

  /* Hide desktop navigation */
  .main-nav {
    display: none;
  }

  /* Hide greeting text on mobile */
  .greeting-text {
    display: none;
  }

  /* User area */
  .user-greeting {
    margin-left: auto;
    margin-right: 10px;
  }

  .user-badge {
    padding: 4px 7px;
  }

  .user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Show hamburger */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Search/filter bar */
  .filter-bar {
    display: none;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width: 480px) {
  .portal-header {
    padding: 12px 15px;
  }

  .logo img {
    height: 32px;
  }

  .user-icon img {
    width: 22px;
    height: 22px;
  }

  .user-name {
    max-width: 70px;
    font-size: 12px;
  }

  .user-arrow svg {
    width: 10px;
    height: 10px;
  }
}

/* =========================================================
   PAGE CONTENT
========================================================= */

.retailer-page {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 30px 50px;
}

.retailer-page-title {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.retailer-page-section {
  margin-bottom: 20px;
  padding: 60px 0 0;
  border-top: 1px solid #000;
}
/* =========================================================
   SIDEBAR + CONTENT LAYOUT
========================================================= */

.retailer-content-layout {
  display: grid;
  grid-template-columns: 17% minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

/* =========================================================
   SIDEBAR
========================================================= */

.retailer-sidebar {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  padding-top: 30px;
  padding-bottom: 50px;
}

/*
 * Sidebar navigation
 */

.retailer-sidebar-nav {
  display: flex;
  flex-direction: column;
}

/*
 * Sidebar links
 */

.retailer-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 42px;
  padding: 0 30px;
  color: #111;
  background: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  border-bottom: 1px solid #dedede;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/*
 * Sidebar text
 */

.retailer-sidebar .sidebar-link-text {
  display: block;
  width: 100%;
  text-transform: uppercase;
}

/*
 * Hover
 */

.retailer-sidebar .sidebar-link:hover {
  background: #f3a9ad;
  color: #111;
}

/*
 * Active menu
 */

.retailer-sidebar .sidebar-link.active {
  background: #f3a9ad;
  color: #111;
}

/*
 * Divider
 */

.retailer-sidebar .sidebar-divider {
  height: 1px;
  margin: 0;
  background: #e7e7e7;
}

/*
 * Logout
 */

.retailer-sidebar .sidebar-logout {
  color: #111;
}

/* =========================================================
   MAIN CONTENT PANEL
========================================================= */

.retailer-content {
  min-width: 0;
  background: #fff;
  border-radius: 20px;
  padding: 30px 30px 40px;
}

/* =========================================================
   CONTENT SECTION
========================================================= */

.retailer-section {
  margin: 0 0 35px;
}

.retailer-section:last-child {
  margin-bottom: 0;
}

.retailer-section-title {
  margin: 0 0 20px;
  padding-bottom: 7px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  border-bottom: 1px solid #dedede;
}

.retailer-section-description {
  margin: 0 0 20px;
  padding-bottom: 7px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

/* =========================================================
   PROFILE INFORMATION
========================================================= */

.retailer-info-list {
  margin: 0;
  padding: 0;
}

.retailer-info-row {
  display: grid;
  grid-template-columns: 25% 5px 1fr;
  column-gap: 10px;
  align-items: start;
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 5px;
}

.retailer-info-label {
  font-weight: 300;
}

/* =========================================================
   FORMS
========================================================= */

.retailer-form {
  max-width: 500px;
}

.retailer-form .retailer-form-group {
  margin-bottom: 12px;
}

.retailer-form .retailer-form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 300;
}

.retailer-form .retailer-form-group input,
.retailer-form .retailer-form-group select,
.retailer-form .retailer-form-group textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  color: #111;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.retailer-form .retailer-form-group input:focus,
.retailer-form .retailer-form-group select:focus,
.retailer-form .retailer-form-group textarea:focus {
  border-color: #999;

  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.retailer-form .retailer-form-group textarea {
  min-height: 90px;
  resize: vertical;
}

/* =========================================================
   PASSWORD FIELD
========================================================= */

.retailer-password-field {
  position: relative;
}

.retailer-password-field input {
  padding-right: 38px;
}

.retailer-password-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #777;
}

.retailer-password-toggle:hover {
  color: #222;
}

.password-eye-icon {
  display: flex;
  width: 20px;
  height: 20px;
}

.password-eye-icon svg {
  width: 100%;
  height: 100%;
}

/* =========================================================
   BUTTON
========================================================= */

.retailer-button {
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 5px solid #a8000c;
  background: #e60012;
  color: #ffffff;
  padding: 10px 32px;
  font-size: 13px;
  min-width: 90px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 20px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.retailer-button:hover {
  background: #c90000;
  color: #fff;
}

.retailer-button:active {
  transform: translateY(1px);
}

.retailer-password-message {
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.retailer-password-message.success {
  background: #eaf7ee;
  border: 1px solid #b7dfc2;
  color: #247a3d;
}

.retailer-password-message.error {
  background: #fff0f0;
  border: 1px solid #e2b8b8;
  color: #b42318;
}

/* =========================================================
   ORDERS
========================================================= */

.retailer-orders-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.retailer-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  font-weight: 300;
}

.retailer-orders-table th {
  padding: 5px 8px;
  border-bottom: 3px solid #000;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  width: 15%;
}
.retailer-orders-table th.action-list {
  width: 40%;
}

.retailer-orders-table td {
  padding: 12px 8px;

  border-bottom: 1px solid #eee;

  vertical-align: middle;
}

.retailer-orders-table tbody tr:hover {
  background: #fafafa;
}

/* =========================================================
   ORDER STATUS
========================================================= */

.retailer-order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  font-size: 16px;
  font-weight: 300;
}

.retailer-order-status.pending {
  background: #fff0c7;
}

.retailer-order-status.processing {
  background: #dcecff;
}

.retailer-order-status.completed {
  background: #dff5df;
}

.retailer-order-status.cancelled {
  background: #f5dddd;
}

/* =========================================================
   ORDER ACTION BUTTONS
========================================================= */
.retailer-action-wrapper {
    display: inline-flex;
    align-items: center;
    background: #e86364;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0; 
}

.retailer-cancel-order-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.retailer-action-btn {
    display: inline-block;
    padding: 8px 18px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: normal;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

/* Hover effect for the buttons */
.retailer-action-btn:hover {
    background: #c90000;
    color: #fff;
}
.retailer-cancel-order {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    font-family: inherit;
}

/* =========================================================
   CANCEL PURCHASE ORDER - SWEETALERT2
   ========================================================= */

.retailer-swal-confirm {
  padding: 11px 25px;
  border: 0;
  border-bottom-width: 0px;
  border-bottom-style: none;
  border-bottom-color: currentcolor;
  border-bottom: 5px solid #218838;
  border-radius: 20px;
  background-color: #28a745 !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  text-transform: uppercase;
}

.retailer-swal-confirm:hover {
    background-color: #157347 !important;
}

.retailer-swal-cancel {
  padding: 11px 25px;
  border: 0;
  border-bottom-width: 0px;
  border-bottom-style: none;
  border-bottom-color: currentcolor;
  border-bottom: 5px solid #ddd;
  border-radius: 20px;
  background: #777777 !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  text-transform: uppercase;
}

.retailer-swal-cancel:hover {
    background-color: #000 !important;
}

/* =========================================================
   ADDRESS CARDS
========================================================= */

.retailer-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
}

.retailer-address-card h3 {
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid #dedede;
  padding-bottom: 5px;
  margin: 0 0 15px;
  text-transform: uppercase;
}

.retailer-address-card p {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
}

.retailer-address-card .address-label {
  font-weight: 300;
}

.address-card-grid {
  display: grid;
  grid-template-columns: 30% 5px 1fr;
  column-gap: 10px;
  align-items: start;
  margin-bottom: 5px;
}

/* =========================================================
   ORDER VIEWS ADDRESS CARDS
========================================================= */

.retailer-order-view-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  padding: 0 20px;
}

.retailer-order-view-address-card h3 {
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid #dedede;
  padding-bottom: 5px;
  margin: 0 0 15px;
  text-transform: uppercase;
}

.retailer-order-view-address-card p {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
}

.retailer-order-view-address-card .address-label {
  font-weight: 300;
}

.order-view-address-card-grid {
  display: grid;
  grid-template-columns: 30% 5px 1fr;
  column-gap: 10px;
  align-items: start;
  margin-bottom: 5px;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.retailer-empty {
  padding: 35px 20px;

  text-align: center;

  color: #777;

  font-size: 12px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1024px) {
  .retailer-page {
    padding: 25px 0 40px;
  }
  /* =====================================================
       MOBILE SIDEBAR
    ===================================================== */
  .retailer-content-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .retailer-sidebar {
    width: 100%;
    border-radius: 12px;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
  }

  .retailer-sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .retailer-sidebar .sidebar-link {
    min-height: 50px;
    padding: 0 15px;
    border-bottom: 1px solid #dedede;
  }

  /* Vertical divider between columns */
  .retailer-sidebar .sidebar-link:nth-child(odd) {
    border-right: 1px solid #dedede;
  }

  /* Remove bottom border from the last row */
  .retailer-sidebar .sidebar-link:nth-child(3),
  .retailer-sidebar .sidebar-link:nth-child(4) {
    border-bottom: none;
  }

  .retailer-sidebar .sidebar-divider {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .retailer-page {
    padding: 20px 15px 30px;
  }

  .retailer-page-title {
    font-size: 22px;
  }

  .retailer-content {
    padding: 22px 18px 28px;
  }

  .retailer-address-grid {
    grid-template-columns: 1fr;
  }
  .card-info-grid .info-right {
    border-left: none !important;
    padding-left: 0 !important;
  }
}

/* =========================================================
   ORDER DETAILS
========================================================= */
.retailer-order-header-info {
  display: flex;
  gap: 15px;
  font-size: 16px;
  font-weight: 700;
  padding: 0 20px;
}
.retailer-order-batches {
  padding: 20px;
}
.retailer-order-batches .retailer-batch-card {
  border: 1px solid #ddd;
  border-radius: 30px;
  padding: 40px;
  margin-bottom: 30px;
}
.retailer-order-batches .batch-title {
  margin-top: 0;
  margin-bottom: 5px;
}
.retailer-order-batches .batch-divider {
  height: 1px;
  width: 100%;
  background-color: #ddd;
  margin-bottom: 20px;
}
.retailer-order-batches .retailer-batch-card .batch-details-grid {
  font-size: 16px;
  font-weight: 300;
}
.retailer-order-batches .retailer-batch-card .batch-details-grid .batch-row {
  display: grid;
  grid-template-columns: 18% 5px 1fr;
  column-gap: 10px;
  align-items: start;
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 5px;
}
.retailer-order-batches .retailer-batch-card .batch-details-grid .batch-row .status-disabled {
  font-weight: 500;
}
.status-cancelled {
    display: inline-block;
    padding: 4px 12px;
    background: #fdecea;
    color: #b32d2e;
    border: 1px solid #f5c2c0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
/* =========================================================
   ORDER RECEIVED
========================================================= */
.order-received-page {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 30px 50px;
}

.order-received-title {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.order-received-section {
  margin-bottom: 20px;
  padding: 60px 0 0;
  border-top: 1px solid #000;
}

.order-received-section > p {
    font-size: 16px;
    font-weight: 300;
    color: #000;
}

@media print {

    /* A4 print setup */
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    /* Hide everything first */
    body * {
        visibility: hidden !important;
    }

    html,
    body {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .order-received-page {
        min-height: 0 !important;
        height: auto !important;
    }

    .order-confirmation-card {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Show only the order confirmation */
    .order-confirmation-card,
    .order-confirmation-card * {
        visibility: visible !important;
    }

    /* Position the printable content */
    .order-confirmation-card {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        box-shadow: none !important;
        border: none !important;

        background: #fff !important;
    }

    /* Hide buttons */
    .order-confirmation-actions {
        display: none !important;
    }

    /* Hide the page heading outside the card */
    .order-received-section {
        display: none !important;
    }

    /* Prevent product rows from being split */
    .order-product-row {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    /* Keep important sections together */
    .order-summary-header,
    .order-information,
    .order-products,
    .order-total {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    /* Remove unnecessary spacing */
    .order-received-page,
    .order-received-content-layout {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Make the table fit the printable width */
    .order-product-table {
        width: 100% !important;
    }
}


/* =========================================================
   CONTENT LAYOUT
========================================================= */

.order-received-content-layout {
    width: 100%;
    margin: 0 auto;
}


/* =========================================================
   CONFIRMATION CARD
========================================================= */

.order-confirmation-card {
    width: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 30px 30px 40px;
    box-sizing: border-box;
}


/* =========================================================
   ORDER SUMMARY HEADER
========================================================= */

.order-summary-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 0 0 20px;
    border-bottom: 1px solid #d9d9d9;
}

.order-summary-header > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-summary-header .label,
.order-information .label {
    display: block;
    margin-bottom: 2px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
}

.order-summary-header strong {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
}


/* =========================================================
   ORDER STATUS
========================================================= */

.order-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 13px;
    border: 1px solid #000;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-status.status-pending {
    background: #000;
    color: #fff;
}


/* =========================================================
   ORDER INFORMATION
========================================================= */

.order-information {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #d9d9d9;
}

.order-information > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-information > div > span:not(.label) {
    font-size: 16px;
    line-height: 1.5;
    color: #000;
}


/* =========================================================
   PRODUCTS
========================================================= */

.order-products {
    padding: 20px 0 0;
}

.order-products h2 {
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
}


/* =========================================================
   PRODUCT TABLE
========================================================= */

.order-product-table {
    width: 100%;
    border-top: 1px solid #000;
}

.order-product-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 120px 150px 150px;
    align-items: center;
    min-height: 70px;
    border-bottom: 1px solid #e5e5e5;
}
.order-product-row:last-child {
  border-bottom: none;
}

.order-product-row > div {
    padding: 15px 12px;
    box-sizing: border-box;
}

/* =========================================================
   PRODUCT TABLE HEADING
========================================================= */

.order-product-heading {
    min-height: 45px;
    background: #f7f7f7;
    border-bottom: 1px solid #d9d9d9;
}

.order-product-heading > div {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #000;
}


/* =========================================================
   PRODUCT INFORMATION
========================================================= */

.product-information {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-information strong {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    color: #111;
}

.product-information small {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: #777;
}


/* =========================================================
   QUANTITY / PRICE / TOTAL
========================================================= */

.order-product-row > div:not(.product-information) {
    font-size: 16px;
    line-height: 1.5;
    color: #000;
}

.order-product-heading > div:not(:first-child),
.order-product-row > div:not(:first-child) {
    text-align: right;
}


/* =========================================================
   ORDER TOTAL
========================================================= */

.order-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 50px;
    padding: 25px 30px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #d9d9d9;
}

.order-total span {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-total strong {
    min-width: 150px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    text-align: right;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.order-confirmation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 25px 30px;
}

.order-confirmation-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid #000;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
    cursor: pointer;    
}


/* Primary */

.order-confirmation-actions .button-primary {
    background: #000;
    color: #fff;
}

.order-confirmation-actions .button-primary:hover {
    background: #fff;
    color: #000;
}


/* Secondary */

.order-confirmation-actions .button-secondary {
    background: #fff;
    color: #000;
}

.order-confirmation-actions .button-secondary:hover {
    background: #000;
    color: #fff;
}

.btn-confirm-received {
  padding: 8px 25px;
  border: 0;
  border-bottom-width: 0px;
  border-bottom-style: none;
  border-bottom-color: currentcolor;
  border-bottom: 5px solid #a8000c;
  border-radius: 20px;
  background: #e60012;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Disabled state */
.btn-confirm-received[disabled],
.btn-confirm-received:disabled {
  background: #b0b0b0;
  border-bottom-color: #808080;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-confirm-received[disabled]:hover,
.btn-confirm-received:disabled:hover {
  background: #b0b0b0;
  border-bottom-color: #808080;
}

.action-row .value .subtext {
  color: #a8000c;
}

/* =========================================================
   CANCEL PURCHASE ORDER - SWEETALERT2
   ========================================================= */

.btn-confirm-received-swal {
  padding: 11px 25px;
  border: 0;
  border-bottom-width: 0px;
  border-bottom-style: none;
  border-bottom-color: currentcolor;
  border-bottom: 5px solid #218838;
  border-radius: 20px;
  background-color: #28a745 !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-confirm-received-swal:hover {
    background-color: #157347 !important;
}

.btn-cancel-received-swal {
  padding: 11px 25px;
  border: 0;
  border-bottom-width: 0px;
  border-bottom-style: none;
  border-bottom-color: currentcolor;
  border-bottom: 5px solid #ddd;
  border-radius: 20px;
  background: #777777 !important;
  color: #ffffff !important;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500 !important;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-cancel-received-swal:hover {
    background-color: #000 !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .order-received-page {
        padding: 0 20px 50px;
    }

    .order-received-section {
        padding-top: 40px;
        margin-bottom: 25px;
    }

    .order-received-title {
        font-size: 24px;
        margin-bottom: 14px;
    }

    .order-received-section > p {
        font-size: 14px;
    }


    /* Summary */

    .order-summary-header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px 20px;
    }

    .order-summary-header strong {
        font-size: 18px;
    }


    /* Information */

    .order-information {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px 20px;
    }


    /* Products */

    .order-products {
        padding: 22px 20px;
        overflow-x: auto;
    }

    .order-products h2 {
        font-size: 16px;
    }

    .order-product-table {
        min-width: 650px;
    }


    /* Total */

    .order-total {
        justify-content: space-between;
        gap: 20px;
        padding: 22px 20px;
    }

    .order-total strong {
        min-width: auto;
        font-size: 18px;
    }


    /* Buttons */

    .order-confirmation-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .order-confirmation-actions .button {
        width: 100%;
    }

}

/* ==========================================================================
   3. MAIN CONTENT AREA & CARDS
   ========================================================================== */
.post-type-archive-product .portal-main {
  padding: 0 20px !important;
}
.portal-main {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.bushiroad-dashboard {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 25px 30px 60px;
  box-sizing: border-box;
}

.catalog-section,
.notice-section {
  margin-bottom: 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.5px;
}

.section-header p {
  color: #000;
  font-size: 16px;
  font-weight: 300;
  margin: 0;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.card-banner img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 20px 20px 50px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.card-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 16px;
  font-weight: 300;
  color: #000;
}

.card-info-grid .info-right {
  border-left: 1px solid #000;
  padding-left: 10px;
}

.card-info-grid p {
  margin: 0;
  word-break: break-word;
}

.card-info-grid p strong {
  font-weight: 500;
}

.card-action {
  text-align: center;
  margin-top: 20px;
}

/* Status Badges */
.badge.status-instock {
  background-color: #28a745;
  color: #ffffff;
  border-radius: 12px;
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
}

.badge.status-outofstock {
  background-color: #E60012;
  color: #ffffff;
  border-radius: 12px;
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: middle;
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  border-radius: 20px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.btn-red {
  border-bottom: 5px solid #a8000c;
  background: #e60012;
  color: #ffffff;
  padding: 10px 32px;
  font-size: 13px;
  width: 100%;
  max-width: 240px;
  text-decoration: none;
}

.btn-red:hover {
  background-color: var(--primary-red-hover);
}

.btn-red-large {
  border-bottom: 5px solid #a8000c;
  background: #e60012;
  color: #ffffff;
  padding: 12px 40px;
  font-size: 14px;
  border-radius: 24px;
  width: 100%;
  max-width: 320px;
  text-decoration: none;
}

.section-footer-action {
  text-align: center;
  margin-top: 50px;
}

/* ==========================================================================
   4. OPERATIONAL NOTICE SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  border: 1px solid #111111;
  border-radius: var(--card-radius);
  padding: 20px;
  text-align: center;
  word-break: break-word;
}

.contact-icon img {
  width: 80px;
}

.contact-card h5 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.contact-card p {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
}

.contact-card p a {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-dark);
  text-decoration: none;
}

/* ==========================================================================
   5. FOOTER & BACK TO TOP BUTTON
   ========================================================================== */
.portal-footer {
  background-color: var(--footer-bg);
  color: #ffffff;
  padding: 38px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-links .divider {
  color: #fff;
  margin: 0 10px;
}

.footer-copyright {
  font-size: 13px;
  font-weight: 300;
  color: #fff;
  text-align: center;
}

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Laptops / Medium Screens (<= 1024px) */
@media (max-width: 1024px) {
  .portal-header {
    padding: 16px 20px;
  }

  .bushiroad-dashboard {
    padding: 25px 0 60px;
  }

  .filter-bar {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

/* Tablets & Mobile (<= 768px) */
@media (max-width: 768px) {
  .portal-main {
    padding: 0 20px;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-divider {
    display: none;
  }  

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .search-input-group {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .input-wrapper,
  .dropdown-group,
  .dropdown-group select {
    width: 100%;
  }

  /* Product Card Internal Grid Stacked */
  .card-info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .card-banner img {
    height: 180px;
  }

  .portal-footer {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }

  .footer-links {
    justify-content: center;
  }
}

/* Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
  .brand-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .user-badge {
    font-size: 11px;
    padding: 4px 12px;
  }

  .greeting-text {
    font-size: 12px;
  }

  .btn-red-large {
    font-size: 12px;
    padding: 10px 20px;
  }
  /* Grid Layouts Stacked */
  .products-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}