/* =========================================
   BUYER DASHBOARD - YELLOW GREEN PINK THEME
   ========================================= */
:root {
  --yellow:       #FFD700;
  --yellow-light: #FFF8DC;
  --yellow-dark:  #E6C200;
  --green:        #2ECC71;
  --green-light:  #EAFAF1;
  --green-dark:   #27AE60;
  --pink:         #FF6EB4;
  --pink-light:   #FFF0F8;
  --pink-dark:    #E05A9E;
  --white:        #FFFFFF;
  --bg:           #F8F9FA;
  --nav-bg:       #1A1A2E;
  --text:         #2C3E50;
  --text-muted:   #7F8C8D;
  --border:       #E0E0E0;
  --shadow:       0 2px 15px rgba(0,0,0,0.08);
  --radius:       12px;
  --radius-sm:    8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ====== NAVBAR ====== */
.navbar {
  background: var(--nav-bg); padding: 0 30px;
  height: 65px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-brand .logo-icon { font-size: 26px; }
.navbar-brand h1 { font-size: 20px; font-weight: 800; background: linear-gradient(135deg, var(--yellow), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-search { flex: 1; max-width: 400px; margin: 0 30px; }
.search-wrap { position: relative; }
.search-wrap input { width: 100%; padding: 10px 45px 10px 16px; border-radius: 25px; border: none; background: rgba(255,255,255,0.12); color: #fff; font-size: 13px; outline: none; }
.search-wrap input::placeholder { color: rgba(255,255,255,0.5); }
.search-wrap input:focus { background: rgba(255,255,255,0.2); }
.search-wrap button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--yellow); cursor: pointer; font-size: 16px; }
.navbar-right { display: flex; align-items: center; gap: 8px; }
.nav-icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: background 0.2s; color: #fff; }
.nav-icon-btn:hover { background: rgba(255,215,0,0.25); }
.nav-icon-btn .count { position: absolute; top: -2px; right: -2px; background: var(--pink); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 10px; min-width: 16px; text-align: center; }
.nav-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 12px; border-radius: 25px; background: rgba(255,255,255,0.1); transition: all 0.2s; }
.nav-user:hover { background: rgba(255,215,0,0.2); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--pink)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--nav-bg); font-size: 13px; }
.nav-user span { color: #fff; font-size: 13px; font-weight: 600; }
.nav-login-btn { background: linear-gradient(135deg, var(--yellow), var(--pink)); color: var(--nav-bg) !important; font-weight: 700; padding: 8px 20px; border-radius: 25px; font-size: 13px; }

/* ====== CATEGORY BAR ====== */
.cat-bar { background: #fff; padding: 0 30px; border-bottom: 2px solid var(--yellow-light); overflow-x: auto; white-space: nowrap; }
.cat-bar::-webkit-scrollbar { height: 3px; }
.cat-bar a { display: inline-block; padding: 13px 18px; font-size: 13px; font-weight: 600; color: var(--text-muted); border-bottom: 3px solid transparent; transition: all 0.2s; margin-bottom: -2px; }
.cat-bar a:hover, .cat-bar a.active { color: var(--yellow-dark); border-color: var(--yellow); }

/* ====== WRAPPER ====== */
.page-wrapper { max-width: 1300px; margin: 0 auto; padding: 25px 20px; }

/* ====== HERO BANNER ====== */
.hero { background: linear-gradient(135deg, var(--nav-bg) 0%, #2C2C54 50%, #1A1A2E 100%); border-radius: var(--radius); padding: 50px 40px; margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; top: -50px; right: -50px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,215,0,0.08); }
.hero::after { content: ''; position: absolute; bottom: -80px; left: 30%; width: 250px; height: 250px; border-radius: 50%; background: rgba(255,110,180,0.08); }
.hero-text h2 { font-size: 32px; font-weight: 900; color: #fff; line-height: 1.2; }
.hero-text h2 span { background: linear-gradient(135deg, var(--yellow), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { color: rgba(255,255,255,0.7); margin-top: 10px; font-size: 15px; }
.hero-btns { display: flex; gap: 12px; margin-top: 20px; }
.hero-emoji { font-size: 80px; position: relative; z-index: 1; }

/* ====== SECTION TITLE ====== */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-title a { font-size: 13px; color: var(--pink); font-weight: 600; }

/* ====== PRODUCT GRID ====== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-bottom: 30px; }
.product-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.product-img { height: 180px; background: var(--yellow-light); display: flex; align-items: center; justify-content: center; font-size: 50px; position: relative; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge { position: absolute; top: 8px; left: 8px; background: var(--pink); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.product-badge.new { background: var(--green); }
.wishlist-btn { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.wishlist-btn:hover, .wishlist-btn.active { background: var(--pink); }
.product-body { padding: 12px; }
.product-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-shop { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.product-price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-main { font-size: 16px; font-weight: 800; color: var(--text); }
.price-old { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.price-off { font-size: 10px; background: var(--green-light); color: var(--green-dark); padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.product-footer { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; }
.product-footer .btn { flex: 1; justify-content: center; font-size: 12px; padding: 7px 5px; }

/* ====== BUTTONS ====== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-yellow { background: var(--yellow); color: var(--nav-bg); }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-green  { background: var(--green);  color: #fff; }
.btn-green:hover  { background: var(--green-dark); }
.btn-pink   { background: var(--pink);   color: #fff; }
.btn-pink:hover   { background: var(--pink-dark); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow-dark); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-danger { background: #E74C3C; color: #fff; }

/* ====== CARDS ====== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-title { font-size: 16px; font-weight: 700; }

/* ====== FORMS ====== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); transition: border-color 0.2s; outline: none; background: #fff; }
.form-control:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,215,0,0.15); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 35px; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-row { display: grid; gap: 15px; }
.form-row.col-2 { grid-template-columns: 1fr 1fr; }
.form-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ====== ALERTS ====== */
.alert { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid var(--green); }
.alert-error   { background: #FDEDEC; color: #C0392B; border: 1px solid #E74C3C; }
.alert-warning { background: var(--yellow-light); color: #856404; border: 1px solid var(--yellow); }
.alert-info    { background: #EBF5FB; color: #1A5276; border: 1px solid #3498DB; }

/* ====== BADGES ====== */
.badge-status { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-pending    { background: #FEF9E7; color: #D4AC0D; }
.badge-confirmed  { background: var(--green-light); color: var(--green-dark); }
.badge-processing { background: #EBF5FB; color: #2980B9; }
.badge-shipped    { background: #F4ECF7; color: #8E44AD; }
.badge-delivered  { background: var(--green-light); color: var(--green-dark); }
.badge-cancelled  { background: #FDEDEC; color: #E74C3C; }
.badge-paid       { background: var(--green-light); color: var(--green-dark); }
.badge-refunded   { background: var(--pink-light); color: var(--pink-dark); }
.badge-requested  { background: #FEF9E7; color: #D4AC0D; }
.badge-approved   { background: var(--green-light); color: var(--green-dark); }
.badge-rejected   { background: #FDEDEC; color: #E74C3C; }

/* ====== TABLE ====== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: linear-gradient(135deg, var(--yellow-light), var(--pink-light)); }
th { padding: 12px 15px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; }
td { padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 13px; }
tbody tr:hover { background: #FAFAFA; }
tbody tr:last-child td { border-bottom: none; }

/* ====== SIDEBAR LAYOUT ====== */
.layout-with-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.sidebar-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 90px; }
.sidebar-box .sb-header { padding: 15px 18px; background: linear-gradient(135deg, var(--yellow-light), var(--pink-light)); font-weight: 700; font-size: 14px; }
.sidebar-box a { display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: var(--text); font-size: 13px; border-bottom: 1px solid var(--border); transition: all 0.2s; }
.sidebar-box a:last-child { border-bottom: none; }
.sidebar-box a:hover, .sidebar-box a.active { background: var(--yellow-light); color: var(--yellow-dark); font-weight: 600; }

/* ====== CART ====== */
.cart-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.cart-item:last-child { border-bottom: none; }
.cart-img { width: 80px; height: 80px; border-radius: var(--radius-sm); background: var(--yellow-light); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; }
.cart-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-info .cart-shop { font-size: 11px; color: var(--text-muted); }
.cart-info .cart-price { font-size: 16px; font-weight: 800; margin-top: 6px; }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { border-color: var(--yellow); background: var(--yellow-light); }
.qty-num { font-weight: 700; font-size: 15px; min-width: 25px; text-align: center; }

/* ====== ORDER SUMMARY ====== */
.order-summary { background: linear-gradient(135deg, var(--yellow-light), var(--pink-light)); border-radius: var(--radius); padding: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.summary-row.total { border-top: 2px solid var(--border); margin-top: 8px; padding-top: 12px; font-size: 16px; font-weight: 800; }

/* ====== STEP PROGRESS ====== */
.step-progress { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.step { display: flex; align-items: center; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid var(--border); color: var(--text-muted); background: #fff; }
.step.active .step-circle { background: var(--yellow); border-color: var(--yellow); color: var(--nav-bg); }
.step.done .step-circle { background: var(--green); border-color: var(--green); color: #fff; }
.step-line { width: 60px; height: 2px; background: var(--border); }
.step.done + .step .step-line { background: var(--green); }
.step-label { font-size: 11px; text-align: center; margin-top: 4px; color: var(--text-muted); }
.step.active .step-label { color: var(--yellow-dark); font-weight: 700; }

/* ====== ORDER TRACK ====== */
.order-track { padding: 10px 0; }
.track-step { display: flex; gap: 15px; padding-bottom: 20px; position: relative; }
.track-step::before { content: ''; position: absolute; left: 17px; top: 35px; bottom: 0; width: 2px; background: var(--border); }
.track-step:last-child::before { display: none; }
.track-step.done::before { background: var(--green); }
.track-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.track-step.done .track-icon { background: var(--green); }
.track-step.active .track-icon { background: var(--yellow); }
.track-text h5 { font-size: 13px; font-weight: 600; }
.track-text p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ====== PRODUCT DETAIL ====== */
.product-detail-img { border-radius: var(--radius); overflow: hidden; background: var(--yellow-light); min-height: 320px; display: flex; align-items: center; justify-content: center; font-size: 80px; }
.product-detail-img img { width: 100%; max-height: 380px; object-fit: cover; }
.product-detail-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.product-detail-price { font-size: 28px; font-weight: 900; margin: 12px 0; }
.star-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.star-row .count { font-size: 12px; color: var(--text-muted); }

/* ====== FILTER SIDEBAR ====== */
.filter-box { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 15px; }
.filter-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 13px; }
.filter-option input { accent-color: var(--yellow); }

/* ====== EMPTY STATE ====== */
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .empty-icon { font-size: 60px; margin-bottom: 15px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }

/* ====== LOGIN PAGE ====== */
.login-body { background: linear-gradient(135deg, #1A1A2E, #2C2C54); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 20px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { font-size: 48px; }
.login-logo h1 { font-size: 22px; font-weight: 900; margin-top: 8px; background: linear-gradient(135deg, var(--yellow-dark), var(--pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ====== RATING STARS ====== */
.stars-input { display: flex; gap: 5px; }
.stars-input label { font-size: 24px; cursor: pointer; color: #ddd; transition: color 0.2s; }
.stars-input input { display: none; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: var(--yellow); }

/* ====== FOOTER ====== */
.site-footer { background: var(--nav-bg); color: rgba(255,255,255,0.7); padding: 30px; text-align: center; margin-top: 40px; font-size: 13px; }
.site-footer a { color: var(--yellow); }

/* ====== PAGINATION ====== */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-link { padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); font-size: 13px; transition: all 0.2s; }
.page-link:hover, .page-link.active { background: var(--yellow); border-color: var(--yellow); color: var(--nav-bg); font-weight: 700; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) { .layout-with-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .navbar { padding: 0 15px; }
  .navbar-search { display: none; }
  .hero { padding: 30px 20px; }
  .hero-emoji { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row.col-2, .form-row.col-3 { grid-template-columns: 1fr; }
  .page-wrapper { padding: 15px; }
}
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }
