/* ===== CSS VARIABLES - Purple Theme ===== */
:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #a78bfa;
  --primary-glow: rgba(124, 58, 237, 0.35);
  --primary-subtle: rgba(124, 58, 237, 0.08);
  --accent: #c084fc;
  --bg: #faf7ff;
  --surface: #ffffff;
  --text: #2d1b69;
  --text-muted: #6b5b95;
  --border: #e2d9f3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Georgia', serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  color: var(--primary);
}

.logo img {
  max-height: 50px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo img:hover {
  filter: drop-shadow(0 0 8px var(--primary-glow));
  transform: scale(1.05);
}

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  gap: 2rem;
  box-shadow: 0 2px 20px rgba(124, 58, 237, 0.08);
}

/* ===== NAVIGATION ===== */
header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

header nav ul li a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.35s ease;
  border-radius: 2px;
}

header nav ul li a:hover {
  color: var(--primary);
}

header nav ul li a:hover::after {
  width: 100%;
}

/* ===== HEADER RIGHT ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ===== SEARCH BOX ===== */
.search-box {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--primary-light);
  border-radius: 25px;
  padding: 0.3rem 0.8rem;
  gap: 0.5rem;
  background: var(--primary-subtle);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 180px;
  background: transparent;
  color: var(--text);
}

/* ===== ICONS ===== */
.icons {
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  cursor: pointer;
}

.icons i {
  transition: color 0.3s ease, transform 0.25s ease;
}

.icons i:hover {
  color: var(--primary);
  transform: scale(1.2) rotate(-5deg);
}

/* ===== PRODUCT SECTION ===== */
.product {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 5%;
  gap: 3rem;
}

/* ===== GALLERY ===== */
.gallery {
  flex: 1;
  text-align: center;
}

.main-img {
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.main-img:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.25);
}

/* ===== PRICE ===== */
.price {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: bold;
  margin: 1rem 0;
  animation: pulse-price 2.5s ease-in-out infinite;
}

@keyframes pulse-price {
  0%, 100% { text-shadow: 0 0 0px transparent; color: var(--primary); }
  50% { text-shadow: 0 0 14px var(--primary-glow); color: var(--primary-dark); }
}

/* ===== THUMBNAILS ===== */
.thumbnails {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.thumbnails img {
  width: 60px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnails img:hover {
  border: 2px solid var(--primary);
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

/* ===== DETAILS ===== */
.details { flex: 1; }

.details h3 {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.details h1 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

/* ===== RATING ===== */
.rating { color: #f4c542; font-size: 1.2rem; }

.rating .reviews {
  color: var(--primary);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* ===== STOCK ===== */
.stock { font-size: 0.9rem; margin: 0.5rem 0; }

.stock .in-stock {
  color: #d946ef;
  font-weight: bold;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== COLOR SWATCHES ===== */
.colors { display: flex; gap: 10px; margin: 1rem 0; }

.colors span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.colors span:hover {
  transform: scale(1.25);
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ===== SPECS ===== */
.specs { list-style: none; margin: 1rem 0; padding: 0; color: var(--text); }

.specs li {
  margin: 0.4rem 0;
  padding-left: 0.8rem;
  border-left: 3px solid var(--primary-light);
  transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.specs li:hover {
  border-color: var(--primary);
  padding-left: 1.2rem;
}

/* ===== DESCRIPTION ===== */
.desc { font-size: 0.9rem; color: var(--text-muted); margin: 1rem 0; }

/* ===== QUANTITY ===== */
.quantity { margin: 1.5rem 0; }

.qty-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  width: 120px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.1);
  transition: box-shadow 0.3s ease;
}

.qty-box:hover {
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
}

.qty-box button {
  flex: 1;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.qty-box button:hover {
  background: linear-gradient(135deg, var(--primary-dark), #4c1d95);
  transform: scale(1.08);
}

.qty-box input {
  width: 50px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  background: var(--primary-subtle);
}

/* ===== BUTTONS ===== */
.buttons { display: flex; gap: 1rem; }

.add-cart, .buy-now {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.add-cart::before, .buy-now::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s ease;
}

.add-cart:hover::before, .buy-now:hover::before {
  left: 150%;
}

.add-cart {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  animation: pulse-btn 3s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 4px 15px var(--primary-glow); }
  50% { box-shadow: 0 4px 30px rgba(124, 58, 237, 0.55); }
}

.add-cart:hover {
  background: linear-gradient(135deg, var(--primary-dark), #4c1d95);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.45);
  animation: none;
}

.buy-now {
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
}

.buy-now:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
}

/* ===== REVIEWS ===== */
.gallery .reviews { margin-top: 2rem; text-align: left; }

.reviews {
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #faf7ff, #f3e8ff);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1);
  animation: fadeInUp 1s ease-in-out;
}

.reviews h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: left;
}

.review {
  padding: 0.8rem;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlide 0.8s ease forwards;
  transition: background 0.3s ease, padding-left 0.3s ease;
  border-radius: 8px;
}

.review:hover {
  background: rgba(124, 58, 237, 0.05);
  padding-left: 1rem;
}

.review:last-child { border-bottom: none; }
.review:nth-child(2) { animation-delay: 0.3s; }
.review:nth-child(3) { animation-delay: 0.6s; }

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlide {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--primary-glow); }
  70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #1e1145, #2d1b69);
  padding: 3rem 5%;
  font-family: Georgia, serif;
  color: #e9d5ff;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-col h3,
.footer-col .logo { margin-bottom: 1rem; font-weight: bold; color: var(--accent); }

.footer-col p { margin: 0.5rem 0; color: #c4b5fd; }

.footer-col ul { list-style: none; padding: 0; }

.footer-col ul li { margin: 0.4rem 0; }

.footer-col ul li a {
  text-decoration: none;
  color: #c4b5fd;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* ===== SUBSCRIBE ===== */
.subscribe { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }

.subscribe input {
  padding: 0.5rem;
  border: none;
  border-bottom: 2px solid #6d28d9;
  background: transparent;
  outline: none;
  color: #e9d5ff;
  transition: border-color 0.3s ease;
}

.subscribe input:focus { border-color: var(--accent); }

.subscribe button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 0.6rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
}

.subscribe button:hover {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* ===== SOCIALS ===== */
.socials { display: flex; gap: 1rem; margin-top: 1rem; }

.socials a {
  color: #c4b5fd;
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.socials a:hover {
  color: var(--accent);
  transform: scale(1.25) rotate(-8deg);
  animation: pulse-ring 0.6s ease;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(167, 139, 250, 0.3);
  padding-top: 1rem;
  color: #a78bfa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .socials { justify-content: center; }
}

@media (max-width: 1024px) {
  .product { flex-direction: column; align-items: center; text-align: center; }
  .details { display: flex; flex-direction: column; text-align: left; margin-top: 2rem; width: 100%; }
  .details .buttons { order: 1; margin-bottom: 1.5rem; flex-direction: column; display: flex; }
  .details h3 { order: 2; }
  .details h1 { order: 3; }
  .stock { order: 4; }
  .rating { order: 5; }
  .colors { order: 6; }
  .quantity { order: 7; }
  .price { order: 8; }
  .desc, .specs { order: 9; margin-top: 1rem; }
  .reviews { order: 10; margin-top: 2rem; }
  .gallery .reviews { text-align: center; }
  .qty-box { width: 140px; }
}

@media (max-width: 768px) {
  header { flex-direction: column; gap: 1rem; text-align: center; }
  header nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .header-right { flex-direction: column; gap: 1rem; }
  .product { flex-direction: column; gap: 2rem; }
  .main-img { order: 0; max-width: 90%; }
  .gallery .buttons { order: 2; display: flex; justify-content: center; flex-direction: column; gap: 1rem; margin-top: 1rem; width: 100%; }
  .gallery .buttons a { flex: 1; min-width: 120px; text-align: center; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  body { font-size: 0.9rem; }
  header { padding: 1rem 2%; }
  .logo img { max-height: 40px; }
  .search-box input { width: 140px; font-size: 0.8rem; }
  .main-img { order: 0; max-width: 100%; }
  .gallery .buttons { order: 2; flex-direction: column; margin-top: 10px; width: 100%; }
  .gallery .buttons a { width: 100%; text-align: center; }
  .thumbnails img { width: 45px; }
  .qty-box { width: 100px; }
  .qty-box button { font-size: 1rem; padding: 0.4rem; }
  .qty-box input { width: 35px; font-size: 1rem; }
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .socials { justify-content: center; }
}
