/*
Theme Name: Premium Shop
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A premium dark luxury e-commerce theme for fitness products
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: premium-shop
Tags: e-commerce, dark, luxury, woocommerce

This theme is built for WooCommerce and features a modern dark aesthetic.
*/

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */

/* Prevent horizontal scroll on all pages */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  background: #000;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;

  /* 🎨 PREMIUM BACKGROUND */
  background: radial-gradient(circle at 20% 20%, rgba(102,0,255,0.22), rgba(0,0,0,0.88)),
              radial-gradient(circle at 80% 80%, rgba(0,102,255,0.18), rgba(0,0,0,0.85)),
              #000;
  background-attachment: fixed;
  background-size: cover;
}

body.menu-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0px);
}

.mobile-menu-logo {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 40px;
  height: auto;
  opacity: 0.95;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.1em;
}

.menu {
  display: none;
  gap: 2.5rem;
  color: #d1d5db;
  font-size: 1rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 768px) {
  .menu {
    display: flex;
  }
}

.menu a {
  cursor: pointer;
  transition: color 0.3s;
  text-decoration: none;
  color: #d1d5db;
}

.menu a:hover {
  color: #fff;
}

/* ==========================================================================
   CART ICON
   ========================================================================== */

.cart-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  margin-left: auto;
  margin-right: 1rem;
}

.cart-icon svg {
  width: 28px;
  height: 28px;
  transition: all 0.3s;
}

.cart-icon:hover {
  color: #fff;
  transform: scale(1.1);
}

.cart-icon:hover svg {
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #7e22ce, #2563eb);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  box-shadow: 0 0 12px rgba(126, 34, 206, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 767px) {
  .cart-icon {
    width: 36px;
    height: 36px;
    margin-right: 0.75rem;
  }

  .cart-icon svg {
    width: 24px;
    height: 24px;
  }

  .cart-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
}

/* ==========================================================================
   MOBILE MENU BUTTON
   ========================================================================== */

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 60;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* ==========================================================================
   MOBILE MENU BACKDROP & MENU
   ========================================================================== */

.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 54;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease, backdrop-filter 0.5s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .mobile-menu-backdrop {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 255, 132, 0.95), rgba(0, 200, 100, 0.98));
  backdrop-filter: blur(16px);
  border-left: 2px solid rgba(0, 255, 132, 0.6);
  box-shadow: -10px 0 40px rgba(0, 255, 132, 0.4);
  z-index: 55;
  padding: 5rem 2rem 2rem;
  transition: right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(18, 0, 26, 0.1);
  border: 1px solid rgba(18, 0, 26, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.mobile-menu-close:hover {
  background: rgba(18, 0, 26, 0.2);
  transform: rotate(90deg);
  box-shadow: 0 0 6px rgba(0, 255, 132, 0.5);
}

.mobile-menu-close::before,
.mobile-menu-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #12001A;
}

.mobile-menu-close::before {
  transform: rotate(45deg);
}

.mobile-menu-close::after {
  transform: rotate(-45deg);
}

.mobile-menu-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(18, 0, 26, 0.2);
}

.mobile-menu-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1A0B2E;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-style: normal;
}

.mobile-menu-subtitle {
  font-size: 0.95rem;
  color: #1F1233;
  opacity: 0.85;
  font-weight: 500;
}

.mobile-menu-links {
  flex: 1;
}

.mobile-menu a {
  display: block;
  color: #12001A;
  text-decoration: none;
  font-size: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(18, 0, 26, 0.2);
  transition: all 0.3s;
  position: relative;
  padding-left: 1rem;
  font-weight: 600;
}

.mobile-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 3px;
  background: #F5F5F5;
  transition: width 0.3s;
  box-shadow: 0 0 8px rgba(245, 245, 245, 0.6);
}

.mobile-menu a:hover,
.mobile-menu a:active {
  color: #F5F5F5;
  padding-left: 1.5rem;
  text-shadow: 0 0 6px rgba(0, 255, 132, 0.6);
}

.mobile-menu a:hover::before {
  width: 10px;
}

.mobile-menu-footer {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(18, 0, 26, 0.2);
  text-align: center;
}

.mobile-menu-footer-text {
  font-size: 0.85rem;
  color: #12001A;
  letter-spacing: 0.05em;
  font-weight: 500;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}

/* MOBILE ADJUSTMENTS FOR NAV */
@media (max-width: 767px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  padding: 2rem 0;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  margin-top: 4rem;
}

@media (max-width: 767px) {
  footer {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }
}

footer .footer-logo {
  margin-bottom: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  color: rgba(156, 163, 175, 0.8);
}

.footer-links a {
  cursor: pointer;
  transition: color 0.3s;
  text-decoration: none;
  color: rgba(156, 163, 175, 0.8);
}

.footer-links a:hover {
  color: #fff;
}

/* ==========================================================================
   CUSTOM SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6020e9, #9747ff);
  border-radius: 10px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
  transition: 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7435ff, #b084ff);
  box-shadow: 0 0 8px rgba(135, 60, 255, 0.6);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #7435ff #0a0a0a;
}

/* ==========================================================================
   WORDPRESS ADMIN BAR FIX
   ========================================================================== */

body.admin-bar nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar nav {
    top: 46px;
  }
}

/* Notification animations - ADD THIS AT THE END OF YOUR <style> SECTION */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* ==========================================================================
   MOBILE MENU VIEWPORT FIX - Add to end of style.css
   ========================================================================== */

/* Fix for very small phones (< 360px width) */
@media (max-width: 359px) {
  /* Increase menu width to 85% to prevent too-narrow menu on tiny screens */
  .mobile-menu {
    width: 85%;
    padding: 4rem 1.5rem 1.5rem;
  }
  
  /* Scale down logo to prevent overlap with close button */
  .mobile-menu-logo {
    width: 32px;
    top: 1.25rem;
    left: 1.25rem;
  }
  
  /* Scale down close button */
  .mobile-menu-close {
    width: 36px;
    height: 36px;
    top: 1.25rem;
    right: 1.25rem;
  }
  
  .mobile-menu-close::before,
  .mobile-menu-close::after {
    width: 18px;
  }
  
  /* Reduce title size to prevent line breaks */
  .mobile-menu-title {
    font-size: 1.5rem;
    letter-spacing: 0.08em;
  }
  
  /* Scale down subtitle */
  .mobile-menu-subtitle {
    font-size: 0.85rem;
  }
  
  /* Reduce menu link size to fit longer text */
  .mobile-menu a {
    font-size: 1.25rem;
    padding: 1rem 0;
    padding-left: 0.75rem;
  }
  
  .mobile-menu a:hover,
  .mobile-menu a:active {
    padding-left: 1.25rem;
  }
}

/* Fix for standard small phones (360px - 400px) */
@media (min-width: 360px) and (max-width: 400px) {
  /* Slightly adjust menu width */
  .mobile-menu {
    width: 78%;
  }
  
  /* Minor adjustments for better fit */
  .mobile-menu-title {
    font-size: 1.6rem;
    letter-spacing: 0.1em;
  }
  
  .mobile-menu a {
    font-size: 1.35rem;
  }
}

/* Ensure menu never causes horizontal scroll */
@media (max-width: 767px) {
  /* Prevent menu from extending beyond viewport */
  .mobile-menu {
    max-width: 90%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  /* Ensure menu header content wraps properly */
  .mobile-menu-header {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  /* Ensure menu links wrap if text is too long */
  .mobile-menu a {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }
  
  /* Ensure footer text wraps */
  .mobile-menu-footer-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* Fix for very short screens (height < 600px) - prevent content cutoff */
@media (max-height: 600px) {
  .mobile-menu {
    padding: 3.5rem 1.5rem 1.5rem;
  }
  
  .mobile-menu-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  
  .mobile-menu-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
  
  .mobile-menu-subtitle {
    font-size: 0.85rem;
  }
  
  .mobile-menu a {
    font-size: 1.25rem;
    padding: 0.9rem 0;
  }
  
  .mobile-menu-footer {
    padding-top: 1rem;
  }
}

/* Fix for iPhone SE (375x667) and similar */
@media (max-width: 375px) and (max-height: 667px) {
  .mobile-menu {
    width: 80%;
  }
  
  .mobile-menu-logo {
    width: 36px;
  }
}