/*
Theme Name: Diary Store Purple
Theme URI: https://example.com/diary-store-purple
Author: ChatGPT
Description: Fully customizable WooCommerce theme with announcement slider, categories mega dropdown, search, account, register, cart, and purple/white palette.
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: dspurple
*/

/* 🎨 Color Variables */
:root {
  --purple: #6D28D9;
  --accent: #8B5CF6;
  --white: #ffffff;
  --black: #0b0b0b;
  --muted: #6b7280;
  --bg: #ffffff;
  --soft: #f8f7ff;
  --radius: 16px;
  --transition: all 0.25s ease;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Noto Sans", sans-serif;
  color: #111827; background: var(--bg); line-height: 1.5;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--purple); }
img { max-width: 100%; display: block; border-radius: 8px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* UI */
.badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600;
}
.btn {
  display: inline-block; background: var(--purple); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; border: 2px solid var(--purple); transition: var(--transition);
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline:hover { background: var(--purple); color: #fff; }

/* Header / nav basics (keep minimal here; modify header.php as needed) */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.topbar {
  background: #000;
  color: #fff;
}
.navrow {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

/* Searchbar ko flex container banaya taaki input aur button ek line mein ho */
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #eee;
  border-radius: 999px;
  padding: 8px 14px;
  width: 100%;
  max-width: 400px; /* aap is width ko customize kar sakte hain */
}

.searchbar input {
  border: none;
  outline: none;
  font-size: 14px;
  flex: 1; /* input ko jitni jagah mile use le */
}

.searchbar button {
  background: transparent;
  border: 2px solid #000;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.searchbar button:hover {
  background-color: #000;
  color: #fff;
}
.cat-panel.open {
  display: block;
}
.menu {
  display: flex;
  align-items: center;
  gap: 24px; /* categories aur menu ke beech space */
  position: relative;
}

.main-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.main-menu li {
  font-weight: 600;
}

.main-menu li a {
  color: #111827;
  text-decoration: none;
  padding: 10px 8px;
  display: block;
  transition: color 0.3s ease;
}

.main-menu li a:hover {
  color: var(--purple);
}

/* Cards & grids */
.grid { display: grid; gap: 20px; }
.product-grid, .hp-products { grid-template-columns: repeat(4,1fr); display:grid; gap:16px; }
.card { background:#fff; border:1px solid #eee; border-radius:12px; box-shadow:0 8px 20px rgba(0,0,0,.04); transition: var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow:0 12px 28px rgba(0,0,0,.08); }
.card-pad { padding:16px; }

/* Hero */
.hero { background: var(--soft); }

/* Flash sale style */
.flash-sale .hp-section .hp-products .hp-card { background: #fff; border-radius:12px; overflow:hidden; }
.hp-flash { background: linear-gradient(90deg,var(--purple),var(--accent)); color:#fff; padding:20px;border-radius:12px; }

/* Category cards */
.hp-cat-card img { width:100%; height:auto; border-radius:8px; }

/* Forms */
.hp-search-input { padding:10px 12px; border-radius:12px; border:1px solid #eee; width:100%; }

/* Mini cart */
.mini-cart-count { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:22px; background:var(--purple); color:#fff; border-radius:50%; font-size:12px; margin-left:6px; }
/* Unified button styling */
.hp-actions a.button,
.hp-actions a.btn-outline {
  background-color: #6c3bd1; /* Primary purple */
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #6c3bd1;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.hp-actions a.button:hover,
.hp-actions a.btn-outline:hover {
  background-color: #4a259c; /* Darker on hover */
  border-color: #4a259c;
  color: #fff;
}

/* Container for spacing */
.hp-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}


/* Footer */
.footer { background:#111827; color:#e5e7eb; padding:40px 20px; margin-top:40px; }
.footer a { color:#e5e7eb; }

/* Responsive */
@media (max-width:1024px) {
  .navrow { grid-template-columns: 1fr auto auto; }
  .product-grid, .hp-products { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:768px) {
  .product-grid, .hp-products { grid-template-columns: repeat(2,1fr); }
  .container { padding: 0 12px; }
}
@media (max-width:500px) {
  .product-grid, .hp-products { grid-template-columns: 1fr; }
  .navrow { grid-template-columns: 1fr auto; }
  .hero { padding:20px 0; }
}
