/* 
 * Toko Temen - Marketplace Stylesheet
 * Theme: Dark Blue + Orange
 * Language: Indonesian
 */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header {
    padding: 8px 0;
    transition: transform 0.35s ease, padding 0.3s ease;
    background: #1f3c88;
}

/* Two-row header layout */
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px 4px;
    position: relative;
}

.header-bottom {
    padding: 4px 16px 12px;
}


.logo {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img {
    height: 96px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: height 0.3s ease;
}

.site-header.shrink {
    padding: 4px 0;
}

.site-header.shrink .header-logo img {
    height: 56px;
}

.site-header.hide {
    transform: translateY(-100%);
}

/* Search Bar */
.search-bar {
    width: 100%;
}

.search-bar form {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #ea580c;
}

/* Cart Icon */
.cart-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.cart-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    transition: background 0.3s;
    position: absolute;
    text-decoration: none;
}

.cart-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cart-icon i {
    font-size: 1.2rem;
}

#cart-count {
    background: #f97316;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    position: absolute;
    top: -6px;
    right: -6px;
}

/* Legacy classes (kept for compatibility) */
.brand-bar,
.main-header {
    display: none;
}

/* ===== CART SIDEBAR ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #1e3a8a;
    color: white;
}

.cart-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.empty-cart {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-name {
    flex: 1;
    font-weight: 500;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem;
}

.cart-item-quantity button {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-quantity button:hover {
    background: #e5e7eb;
}

.cart-item-price {
    font-weight: 600;
    color: #1e3a8a;
    min-width: 100px;
    text-align: right;
}

.cart-item-remove {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 1.2rem;
    line-height: 1;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid #e5e7eb;
    background: #f9fafb;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

#cart-total {
    color: #f97316;
    font-size: 1.4rem;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #10b981;
    color: white;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #059669;
    color: white;
}

.checkout-btn.disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ===== MAIN CONTENT ===== */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h2 {
    color: #1e3a8a;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.page-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #f97316;
    border-radius: 2px;
}

.page-title p {
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(30, 58, 138, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.product-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: #f97316;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-detail, .btn-add-cart {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-detail {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.btn-detail:hover {
    background: #bae6fd;
}

.btn-add-cart {
    background: #f97316;
    color: white;
}

.btn-add-cart:hover {
    background: #ea580c;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.no-products p {
    font-size: 1.2rem;
    color: #6b7280;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.breadcrumb {
    margin-bottom: 2rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #1e3a8a;
}

.breadcrumb a:hover {
    color: #f97316;
    text-decoration: underline;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-detail-image {
    border-radius: 12px;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info h1 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.product-price-large {
    font-size: 2rem;
    color: #f97316;
    margin: 1rem 0;
}

.product-description-full {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #1e3a8a;
}

.product-description-full h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.product-actions-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    background: #f3f4f6;
}

.quantity-control input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-add-cart-large, .btn-buy-now {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-add-cart-large {
    background: #f97316;
    color: white;
}

.btn-add-cart-large:hover {
    background: #ea580c;
}

.btn-buy-now {
    background: #10b981;
    color: white;
}

.btn-buy-now:hover {
    background: #059669;
}

.btn-buy-now.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== PRODUCT DETAIL - WHATSAPP CS BUTTONS (2 CTA) ===== */
.wa-cs-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== CS Buttons – Compact, No Underline ===== */
.wa-cs-btn{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;          /* allow avatar outside */
  height: 52px;               /* match orange button height */
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none !important; /* REMOVE underline */
}

/* ensure underline never appears */
.wa-cs-btn,
.wa-cs-btn:hover,
.wa-cs-btn:focus,
.wa-cs-btn span{
  text-decoration: none !important;
}

/* avatar badge + GLOW RING wrapper */
.wa-cs-btn .wa-cs-avatar-ring{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;                /* outer ring size */
  height: 60px;
  border-radius: 999px;
  z-index: 4;
  pointer-events: none;        /* keep clicks on button */
  padding: 4px;               /* ring thickness (space for gradient) */
  box-sizing: border-box;
}

/* avatar outside ±20% */
.wa-cs1 .wa-cs-avatar-ring{ left: -11px; }
.wa-cs2 .wa-cs-avatar-ring{ right: -11px; }

/* inner avatar image */
.wa-cs-btn .wa-cs-avatar{
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  z-index: 2;
  margin: 0;
  border: 2px solid #ffffff;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}

/* Spinning conic-gradient ring */
.wa-cs-btn .wa-cs-avatar-ring::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    #00f5ff,
    #00ff88,
    #ffe600,
    #ff4dff,
    #00f5ff
  );
  filter: blur(0.6px);
  animation: waCsRingSpin 1.8s linear infinite;
}

/* no ::after cutout needed; padding creates the ring */

@keyframes waCsRingSpin{
  to { transform: rotate(360deg); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .wa-cs-btn .wa-cs-avatar-ring::before{ animation: none; }
}

/* single-line centered text (exclude ring wrapper span) */
.wa-cs-btn > span:not(.wa-cs-avatar-ring){
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  line-height: 52px;                 /* same as button height */
  white-space: nowrap;              /* never wrap */
  overflow: visible;                /* allow full text */
  text-overflow: clip;              /* no ellipsis */
  padding-left: clamp(54px, 16vw, 68px);
  padding-right: clamp(54px, 16vw, 68px);
  margin: 0;
}

/* extra safety for very small screens */
@media (max-width: 360px){
  .wa-cs-btn > span:not(.wa-cs-avatar-ring){
    font-size: 13px;
    padding-left: 54px;
    padding-right: 54px;
  }
}

/* disabled remains non-clickable */
.btn-buy-now.disabled,
.wa-cs-btn[aria-disabled="true"]{
  pointer-events: none;
}

.product-meta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

.product-meta p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.related-products {
    margin-top: 4rem;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.no-related {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.checkout-form h2 {
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.checkout-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.order-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-back {
    flex: 1;
    padding: 1rem;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-back:hover {
    background: #d1d5db;
}

.btn-whatsapp {
    flex: 2;
    padding: 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-whatsapp:hover {
    background: #059669;
}

.checkout-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-steps {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.info-steps li {
    margin-bottom: 0.5rem;
}

.info-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.info-note h4 {
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-note ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.info-contact {
    background: #e0f2fe;
    border-left: 4px solid #0369a1;
    padding: 1rem;
    border-radius: 8px;
}

.info-contact h4 {
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-phone, .contact-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===== FILTER & SORT TOOLBAR (NON-INTRUSIVE) ===== */
.filter-toolbar {
    margin-bottom: 1.5rem;
    position: relative;
}

.toolbar-container {
    display: flex;
    justify-content: flex-end;
}

.toolbar-buttons {
    display: flex;
    gap: 0.75rem;
}

.toolbar-button-group {
    position: relative;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.dropdown-arrow {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item i {
    color: #6b7280;
    width: 16px;
}

/* Filter Panel */
.filter-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    width: 320px;
    max-width: 90vw;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.filter-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.filter-panel-header h4 {
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.close-filter {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-filter:hover {
    color: #374151;
}

.filter-panel-content {
    padding: 1.5rem;
}

.filter-notice {
    background: #f0f9ff;
    border-left: 4px solid #0369a1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: #0369a1;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel-group {
    margin-bottom: 1.25rem;
}

.filter-panel-group:last-child {
    margin-bottom: 0;
}

.filter-panel-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel-group .price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel-group .filter-input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: #374151;
    transition: border 0.3s;
    flex: 1;
}

.filter-panel-group .filter-input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.filter-panel-group .filter-input:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.filter-panel-group .range-separator {
    color: #6b7280;
    font-weight: 500;
}

.filter-panel-group .filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: #374151;
    transition: border 0.3s;
    cursor: pointer;
    width: 100%;
}

.filter-panel-group .filter-select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.filter-panel-group .filter-select:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.filter-panel-group .filter-reset {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-panel-group .filter-reset:hover:not(:disabled) {
    background: #e5e7eb;
}

.filter-panel-group .filter-reset:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* ===== FOOTER ===== */
.footer {
    background: #1e3a8a;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p, .footer-section li {
    color: #dbeafe;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section li::before {
    content: "✓";
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #dbeafe;
    font-size: 0.9rem;
}

/* ===== WELCOME MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-box {
    background: linear-gradient(180deg, #1f3c88, #162b5b);
    color: #fff;
    padding: 24px 20px;
    border-radius: 16px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    animation: popIn 0.35s ease;
}

.modal-box h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.modal-box p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-box button {
    background: #ff7a00;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.modal-box button:active {
    transform: translateY(0);
}

@keyframes popIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-top {
        padding: 6px 12px 4px;
    }
    
    .header-bottom {
        padding: 4px 12px 10px;
    }
    
    .logo img {
        height: 40px;
    }

    .header-logo img {
        height: 88px;
    }

    .site-header.shrink .header-logo img {
        height: 56px;
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
        min-width: unset;
    }
    
    .cart-icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    /* ===== MOBILE PRODUCT GRID OPTIMIZATION ===== */
    .product-grid {
        /* Change from auto-fill to fixed 2 columns for better mobile browsing */
        grid-template-columns: repeat(2, 1fr);
        /* Reduce gap to save space while maintaining readability */
        gap: 1rem;
        /* Reduce bottom margin to fit more content vertically */
        margin-bottom: 2rem;
    }
    
    .product-card {
        /* Slightly reduce shadow for cleaner look on small screens */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        /* Ensure cards don't overflow horizontally */
        overflow: hidden;
    }
    
    .product-image {
        /* Reduce image height to save vertical space */
        height: 140px;
    }
    
    .product-info {
        /* Reduce padding inside product cards */
        padding: 1rem;
    }
    
    .product-info h3 {
        /* Optimized font size for mobile product titles (13-14px) */
        font-size: 0.875rem; /* 14px */
        /* Limit title to 3 lines with ellipsis */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        /* Reduce bottom margin */
        margin-bottom: 0.25rem;
        /* Ensure consistent height with better line spacing */
        min-height: 3.4em; /* 3 lines * 1.3 line-height * 0.875rem */
        line-height: 1.3;
    }
    
    .product-description {
        /* Hide description on mobile to save space */
        display: none;
    }
    
    .product-price {
        /* Slightly smaller price font */
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .product-actions {
        /* Stack buttons vertically on very small screens */
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-detail, .btn-add-cart {
        /* Make buttons full width in column layout */
        width: 100%;
        /* Slightly smaller padding */
        padding: 0.5rem;
        /* Smaller font size */
        font-size: 0.85rem;
    }
    
    .product-category {
        /* Smaller category badge */
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    /* Ensure related products grid also uses 2 columns */
    .related-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* ===== MOBILE FILTER OPTIMIZATION ===== */
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .price-range {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .range-separator {
        display: none;
    }
    
    .filter-reset {
        width: 100%;
    }
    
    /* ===== MOBILE TOOLBAR OPTIMIZATION ===== */
    .toolbar-container {
        justify-content: center;
    }
    
    .toolbar-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .toolbar-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    .filter-panel {
        width: 100%;
        right: 0;
        left: 0;
        margin: 0.5rem auto;
        border-radius: 8px;
    }
    
    /* ===== MOBILE MEDIA SLIDER OPTIMIZATION ===== */
    .media-slider .slides {
        height: 300px;
    }
    
    .media-slider .slide img,
    .media-slider .slide video {
        max-height: 300px;
    }
    
    .slider-nav {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
    
    .slider-nav.prev {
        left: 5px !important;
    }
    
    .slider-nav.next {
        right: 5px !important;
    }
}

/* ===== PRODUCT DETAIL REFACTOR - MOBILE FIRST FRAMELESS ===== */
.media-hero {
    margin: 0 -20px;
    background: white;
}

.media-hero .media-slider {
    background: white;
}

.media-hero .slider-container {
    border-radius: 0 !important;
}

.media-hero .slides {
    border-radius: 0 !important;
    background: white !important;
}

.media-hero .slide img {
    background: white !important;
}

.product-info-container {
    background: white;
    padding: 1.5rem;
    margin-top: 0;
}

.breadcrumb {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    margin: 0 -20px 0;
    font-size: 0.9rem;
}

.product-main-info {
    margin-bottom: 1.5rem;
}

.product-main-info .product-category {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    font-weight: 600;
}

.product-price-large {
    font-size: 1.75rem;
    color: #f97316;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.product-detail-compact {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6b7280;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== VARIANT SELECTION STYLES ===== */
.variant-selection {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.variant-selection-header {
    margin-bottom: 1.5rem;
}

.variant-selection-header h3 {
    color: #1e3a8a;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.variant-instruction {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.attribute-group {
    margin-bottom: 1.5rem;
}

.attribute-group h4 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attribute-option {
    padding: 0.75rem 1.25rem;
    border: 2px solid #cbd5e1;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    min-width: 80px;
    text-align: center;
}

.attribute-option:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.attribute-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.attribute-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e2e8f0;
    background: #f1f5f9;
}

.attribute-option.disabled:hover {
    border-color: #e2e8f0;
    background: #f1f5f9;
}

.selected-variant-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
}

.variant-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.variant-price {
    font-size: 1.5rem;
    color: #f97316;
    font-weight: 700;
}

.variant-stock {
    color: #374151;
    font-size: 1rem;
}

.stock-badge {
    padding: 0.25rem 0.75rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stock-badge.low {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.out {
    background: #fee2e2;
    color: #991b1b;
}

.variant-sku {
    color: #6b7280;
    font-size: 0.9rem;
}

.selected-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.selected-attribute {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.selected-attribute i {
    font-size: 0.8rem;
}

.variant-error {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
}

.variant-error p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-description-collapsible {
    margin: 1.5rem 0;
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.description-header h3 {
    color: #1e3a8a;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-description {
    background: none;
    border: none;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.toggle-description:hover {
    background: #e0f2fe;
}

.description-content {
    padding: 1rem 0;
    line-height: 1.6;
}

.description-content p {
    color: #374151;
    margin: 0;
}

.product-actions-detail {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Remove old product-detail styles */
.product-detail {
    display: block !important;
    grid-template-columns: 1fr !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.product-detail-image {
    display: none;
}

.product-description-full {
    display: none;
}

.product-meta {
    display: none;
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .media-hero {
        margin: 0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .media-hero .slider-container {
        border-radius: 12px !important;
    }
    
    .media-hero .slides {
        border-radius: 12px !important;
    }
    
    .breadcrumb {
        margin: 1.5rem 0;
        padding: 0;
        background: transparent;
    }
    
    .product-info-container {
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        padding: 2rem;
        margin-top: 1.5rem;
    }
    
    .product-title {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 0.375rem;
    }
    
    .product-price-large {
        font-size: 2rem;
        margin-top: 0;
        margin-bottom: 0.75rem;
    }
    
    .product-detail-compact {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .detail-item {
        border-bottom: none;
        padding: 0.75rem;
        background: white;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
    }
}
