/* =========================================
   GLOWURA - Beauty Products E-commerce
   Modern, Responsive, Production-Ready
   ========================================= */

:root {
  --primary: #d4537a;
  --primary-dark: #b13d61;
  --primary-light: #f8d7e0;
  --accent: #c89f6a;
  --dark: #2c1e2a;
  --text: #444;
  --muted: #888;
  --bg: #fffafc;
  --white: #ffffff;
  --border: #eee;
  --success: #4caf50;
  --danger: #e53935;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --container: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; color: var(--dark); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.4rem; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s;
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(212, 83, 122, 0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-dark { background: var(--dark); }
.btn-dark:hover { background: #000; }
.btn-block { display: block; width: 100%; }

/* ===== HEADER ===== */
.top-bar { background: var(--dark); color: #fff; font-size: 0.85rem; padding: 8px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: rgba(255,255,255,0.8); margin-left: 16px; }

.header { background: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.logo span { color: var(--accent); }

.nav-menu { display: flex; gap: 32px; list-style: none; }
.nav-menu a { font-weight: 500; font-size: 0.95rem; color: var(--dark); position: relative; padding: 4px 0; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-menu a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }

.header-actions { display: flex; align-items: center; gap: 18px; font-size: 1.2rem; }
.header-actions a { position: relative; color: var(--dark); }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--primary); color: white; font-size: 0.7rem; font-weight: 600; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.mobile-toggle { display: none; font-size: 1.4rem; color: var(--dark); background: none; border: none; }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, #fef4f7 0%, #fdf0e8 100%); padding: 80px 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero h1 { color: var(--dark); margin-bottom: 20px; font-size: 3.4rem; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.1rem; color: var(--muted); margin-bottom: 30px; max-width: 480px; }
.hero-buttons { display: flex; gap: 14px; }
.hero-img { border-radius: 20px; overflow: hidden; }
.hero-img img { width: 100%; height: 500px; object-fit: cover; border-radius: 20px; }

/* ===== SECTIONS ===== */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { margin-bottom: 10px; }
.section-title p { color: var(--muted); }

/* ===== CATEGORIES ===== */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.category-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s; }
.category-card:hover { transform: translateY(-6px); }
.category-card img { width: 100%; height: 200px; object-fit: cover; }
.category-card-body { padding: 18px; text-align: center; }
.category-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.category-card span { color: var(--muted); font-size: 0.85rem; }

/* ===== PRODUCTS ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.product-card { background: white; border-radius: var(--radius); overflow: hidden; transition: all 0.3s; position: relative; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card .product-image { position: relative; overflow: hidden; aspect-ratio: 1; background: #f9f3f5; }
.product-card .product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-badge { position: absolute; top: 14px; left: 14px; background: var(--primary); color: white; font-size: 0.7rem; padding: 4px 10px; border-radius: 4px; font-weight: 600; letter-spacing: 0.5px; }
.product-badge.sale { background: var(--danger); }
.product-actions { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity 0.3s; }
.product-card:hover .product-actions { opacity: 1; }
.product-actions button { width: 36px; height: 36px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); color: var(--dark); }
.product-actions button:hover { background: var(--primary); color: white; }
.product-card-body { padding: 16px; text-align: center; }
.product-card-body .brand { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.product-card-body h3 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500; margin: 6px 0; color: var(--dark); }
.product-card-body .price { display: flex; justify-content: center; gap: 8px; align-items: center; margin-top: 6px; }
.product-card-body .price strong { color: var(--primary); font-size: 1.05rem; }
.product-card-body .price .old { color: var(--muted); text-decoration: line-through; font-size: 0.85rem; }
.rating { color: #f5b50a; font-size: 0.85rem; margin-top: 4px; }

/* ===== FILTERS ===== */
.page-banner { background: linear-gradient(135deg, #f8d7e0 0%, #fcebd5 100%); padding: 60px 0; text-align: center; }
.page-banner h1 { margin-bottom: 10px; }
.page-banner .breadcrumb { color: var(--muted); font-size: 0.9rem; }
.page-banner .breadcrumb a { color: var(--primary); }

.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; }
.sidebar h4 { font-family: 'Poppins', sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 14px; color: var(--dark); font-weight: 600; }
.filter-group { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; }
.filter-list { list-style: none; }
.filter-list li { padding: 6px 0; cursor: pointer; color: var(--text); font-size: 0.95rem; transition: color 0.2s; display: flex; justify-content: space-between; }
.filter-list li:hover, .filter-list li.active { color: var(--primary); }
.filter-list li span { color: var(--muted); font-size: 0.85rem; }

.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.shop-toolbar select { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; background: white; font-family: inherit; }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.product-gallery .main-image { background: #f9f3f5; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; margin-bottom: 14px; }
.product-gallery .main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row { display: flex; gap: 10px; }
.thumb-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; border: 2px solid transparent; }
.thumb-row img.active, .thumb-row img:hover { opacity: 1; border-color: var(--primary); }

.product-info .brand-tag { color: var(--primary); font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }
.product-info h1 { font-size: 2rem; margin: 8px 0; }
.product-info .price-row { display: flex; gap: 12px; align-items: center; margin: 18px 0; }
.product-info .price-row .price { font-size: 1.8rem; color: var(--primary); font-weight: 600; }
.product-info .price-row .old-price { color: var(--muted); text-decoration: line-through; font-size: 1.1rem; }
.product-info .price-row .discount { background: #ffe5ec; color: var(--primary); padding: 2px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.product-info p { color: var(--muted); margin-bottom: 18px; }
.option-row { margin: 18px 0; }
.option-row label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--dark); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; }
.qty-control button { width: 38px; height: 40px; font-size: 1.1rem; color: var(--dark); }
.qty-control input { width: 50px; height: 40px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-family: inherit; outline: none; }
.product-buttons { display: flex; gap: 12px; margin: 20px 0; }
.product-meta { padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.product-meta div { margin-bottom: 6px; }

.tab-row { display: flex; gap: 30px; border-bottom: 1px solid var(--border); margin: 40px 0 20px; }
.tab-row button { padding: 12px 0; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.tab-row button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { color: var(--text); }
.tab-content.hidden { display: none; }

/* ===== CART ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; }
.cart-table { width: 100%; background: white; border-radius: var(--radius); padding: 8px; }
.cart-row { display: grid; grid-template-columns: 100px 1fr auto auto auto; gap: 18px; padding: 18px; border-bottom: 1px solid var(--border); align-items: center; }
.cart-row:last-child { border-bottom: none; }
.cart-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-row h4 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500; }
.cart-row .product-meta { color: var(--muted); font-size: 0.85rem; padding: 0; border: none; }
.cart-row .price { color: var(--primary); font-weight: 600; }
.cart-row .remove { color: var(--danger); cursor: pointer; font-size: 1.1rem; }

.cart-summary { background: white; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); height: fit-content; position: sticky; top: 90px; }
.cart-summary h3 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; font-weight: 600; color: var(--dark); font-size: 1.15rem; }
.summary-row.total span:last-child { color: var(--primary); }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 4rem; color: var(--primary-light); margin-bottom: 20px; }
.empty-state h3 { margin-bottom: 10px; }

/* ===== CHECKOUT ===== */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 30px; }
.checkout-form { background: white; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--dark); font-size: 0.9rem; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 0.95rem; outline: none; transition: border 0.2s; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.payment-option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--primary); background: #fef7f9; }

/* ===== ACCOUNT ===== */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
.account-sidebar { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); height: fit-content; }
.account-user { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.account-user .avatar { width: 70px; height: 70px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 1.8rem; color: var(--primary); }
.account-menu { list-style: none; }
.account-menu li a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 6px; color: var(--text); font-size: 0.95rem; }
.account-menu li a:hover, .account-menu li a.active { background: #fef0f4; color: var(--primary); }
.account-content { background: white; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.order-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.order-card-head { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; font-size: 0.9rem; }
.status-badge { background: #e7f7e8; color: var(--success); padding: 3px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.status-badge.pending { background: #fff4e0; color: #d97e0a; }
.status-badge.shipped { background: #e0f0ff; color: #1e7fc0; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: white; border-radius: 8px; margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq-q { padding: 18px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: var(--dark); }
.faq-q i { transition: transform 0.3s; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { padding: 0 22px; max-height: 0; overflow: hidden; transition: all 0.3s; color: var(--text); }
.faq-item.open .faq-a { padding: 0 22px 18px; max-height: 500px; }

/* ===== BLOG ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.blog-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s; }
.blog-card:hover { transform: translateY(-6px); }
.blog-card img { width: 100%; height: 220px; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.blog-card h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.3; }
.blog-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.read-more { color: var(--primary); font-weight: 500; font-size: 0.9rem; }

.blog-post { max-width: 820px; margin: 0 auto; }
.blog-post img.hero-image { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius); margin: 20px 0; }
.blog-post h2, .blog-post h3 { margin-top: 30px; margin-bottom: 14px; }
.blog-post p { margin-bottom: 16px; color: var(--text); }

/* ===== STATIC PAGES ===== */
.content-page { max-width: 900px; margin: 0 auto; background: white; padding: 50px; border-radius: var(--radius); box-shadow: var(--shadow); }
.content-page h2 { margin: 28px 0 12px; }
.content-page h3 { margin: 22px 0 10px; font-size: 1.2rem; }
.content-page p, .content-page li { color: var(--text); margin-bottom: 12px; }
.content-page ul, .content-page ol { margin-left: 22px; margin-bottom: 14px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 60px; }
.about-grid img { border-radius: var(--radius); }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 40px 0; }
.value-card { text-align: center; padding: 30px 20px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.value-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 14px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 8px; }

/* ===== FEATURES ===== */
.features-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; padding: 30px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -40px; position: relative; z-index: 10; }
.feature { display: flex; align-items: center; gap: 14px; }
.feature i { font-size: 2rem; color: var(--primary); }
.feature h4 { font-family: 'Poppins', sans-serif; font-size: 0.95rem; color: var(--dark); }
.feature p { font-size: 0.8rem; color: var(--muted); }

/* ===== NEWSLETTER ===== */
.newsletter { background: linear-gradient(135deg, var(--primary) 0%, #c89f6a 100%); color: white; padding: 60px 0; text-align: center; }
.newsletter h2 { color: white; margin-bottom: 10px; }
.newsletter p { opacity: 0.9; margin-bottom: 26px; }
.newsletter form { display: flex; max-width: 480px; margin: 0 auto; background: white; border-radius: 30px; overflow: hidden; padding: 4px; }
.newsletter input { flex: 1; border: none; padding: 12px 20px; font-family: inherit; outline: none; }
.newsletter button { background: var(--dark); color: white; padding: 12px 26px; border-radius: 30px; font-weight: 500; }

/* ===== FOOTER ===== */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { font-family: 'Poppins', sans-serif; color: white; font-size: 1rem; margin-bottom: 18px; font-weight: 600; }
.footer .logo { color: var(--primary-light); margin-bottom: 14px; }
.footer p { color: rgba(255,255,255,0.6); margin-bottom: 14px; font-size: 0.9rem; }
.footer ul { list-style: none; }
.footer ul li { padding: 5px 0; font-size: 0.92rem; }
.footer ul li a { color: rgba(255,255,255,0.7); }
.footer ul li a:hover { color: var(--primary); }
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: white; }
.social-row a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 0.85rem; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--dark); color: white; padding: 14px 22px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 1000; opacity: 0; transform: translateY(20px); transition: all 0.3s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero-img img { height: 320px; }
  .shop-layout { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; gap: 30px; }
  .cart-layout, .checkout-layout, .account-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: white; flex-direction: column; padding: 80px 30px; gap: 20px; box-shadow: -4px 0 20px rgba(0,0,0,0.1); transition: right 0.3s; z-index: 200; }
  .nav-menu.open { right: 0; }
  .mobile-toggle { display: block; }
  .top-bar { display: none; }
  .features-row { margin-top: 0; }
  .content-page { padding: 30px 20px; }
  .cart-row { grid-template-columns: 70px 1fr auto; gap: 12px; }
  .cart-row > *:nth-child(3), .cart-row > *:nth-child(4) { grid-column: 2; }
}

@media (max-width: 580px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .newsletter form { flex-direction: column; border-radius: 14px; gap: 8px; padding: 8px; }
  .newsletter button { width: 100%; }
}
