/*
Theme Name: VSO Flavors Dark Mode
Theme URI: https://vsoflavors.com
Author: VSO Flavors
Author URI: https://vsoflavors.com
Description: Storefront child theme with dark mode toggle
Version: 1.2.7
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vso-flavors-dark
Template: storefront
Requires at least: 5.0
Requires PHP: 7.2
WC requires at least: 3.0
*/

/* Import Storefront styles */
@import url('../storefront/style.css');

:root {
  /* Light Mode */
  --vso-bg: #ffffff;
  --vso-text: #333333;
  --vso-text-light: #666666;
  --vso-border: #e0e0e0;
  --vso-accent: #00cc44;
  --vso-accent-dark: #2d7a2d;
  --vso-hover: #f8f8f8;
}

[data-theme="dark"] {
  /* Dark Mode */
  --vso-bg: #1a1a1a;
  --vso-text: #f5f5f5;
  --vso-text-light: #d0d0d0;
  --vso-border: #2a2a2a;
  --vso-accent: #00ff00;
  --vso-accent-dark: #00cc44;
  --vso-hover: #2a2a2a;
}

/* Light Mode - Header White */
.site-header {
  background-color: #ffffff !important;
}

/* Apply dark mode colors */
[data-theme="dark"] {
  background-color: var(--vso-bg);
  color: var(--vso-text);
}

[data-theme="dark"] body {
  background-color: var(--vso-bg);
  color: var(--vso-text);
}

[data-theme="dark"] .site-header {
  background-color: #1a1a1a !important;
}

[data-theme="dark"] a {
  color: var(--vso-accent);
}

[data-theme="dark"] a:hover {
  color: var(--vso-accent-dark);
}

[data-theme="dark"] .site-header {
  background-color: var(--vso-bg);
  border-color: var(--vso-border);
}

[data-theme="dark"] .site-header a {
  color: var(--vso-text);
}

[data-theme="dark"] .site-header a:hover {
  color: var(--vso-accent);
}

[data-theme="dark"] nav,
[data-theme="dark"] nav a {
  color: var(--vso-text);
}

[data-theme="dark"] nav a:hover {
  color: var(--vso-accent);
}

[data-theme="dark"] .site-footer {
  background-color: var(--vso-hover);
  border-color: var(--vso-border);
}

[data-theme="dark"] .product {
  background-color: transparent !important;
}

[data-theme="dark"] .product:hover {
  background-color: transparent !important;
}

[data-theme="dark"] button,
[data-theme="dark"] input[type="button"],
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] .button {
  background-color: var(--vso-accent);
  color: var(--vso-bg);
  border-color: var(--vso-accent);
}

[data-theme="dark"] button:hover,
[data-theme="dark"] input[type="button"]:hover,
[data-theme="dark"] input[type="submit"]:hover,
[data-theme="dark"] .button:hover {
  background-color: var(--vso-accent-dark);
  border-color: var(--vso-accent-dark);
}

/* Dark Mode - Product Action Buttons (same as light mode) */
[data-theme="dark"] .single_add_to_cart_button,
[data-theme="dark"] .product_type_simple.add_to_cart_button,
[data-theme="dark"] .product_type_variable.add_to_cart_button,
[data-theme="dark"] .add_to_cart_button,
[data-theme="dark"] .woocommerce-loop-product__link,
[data-theme="dark"] button.single_add_to_cart_button,
[data-theme="dark"] input.single_add_to_cart_button {
  background-color: #1a5c1a !important;
  color: #00ff00 !important;
  border-color: #1a5c1a !important;
  font-weight: 600 !important;
  padding: 0.4rem 0.8rem !important;
  font-size: 0.75rem !important;
}

[data-theme="dark"] .single_add_to_cart_button:hover,
[data-theme="dark"] .product_type_simple.add_to_cart_button:hover,
[data-theme="dark"] .product_type_variable.add_to_cart_button:hover,
[data-theme="dark"] .add_to_cart_button:hover,
[data-theme="dark"] .woocommerce-loop-product__link:hover,
[data-theme="dark"] button.single_add_to_cart_button:hover,
[data-theme="dark"] input.single_add_to_cart_button:hover {
  background-color: #0f3f0f !important;
  color: #00ff00 !important;
  border-color: #0f3f0f !important;
}

[data-theme="dark"] .woocommerce-message {
  background-color: var(--vso-accent);
  color: var(--vso-bg);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: var(--vso-hover);
  color: var(--vso-text);
  border-color: var(--vso-border);
}

[data-theme="dark"] .site-title,
[data-theme="dark"] .site-description {
  color: var(--vso-text);
}

/* Theme Toggle Button */
.vso-theme-toggle {
  background: transparent;
  border: 2px solid #1a5c1a;
  color: #1a5c1a;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.vso-theme-toggle:hover {
  background-color: #1a5c1a;
  color: #ffffff;
}

[data-theme="dark"] .vso-theme-toggle {
  border-color: #1a5c1a;
  color: #1a5c1a;
}

[data-theme="dark"] .vso-theme-toggle:hover {
  background-color: #1a5c1a;
  color: #00ff00;
}

.vso-theme-toggle-icon {
  font-size: 1.1rem;
}

/* Light Mode - Enhanced Green Branding */

/* Default Buttons */
button,
input[type="button"],
input[type="submit"],
.button {
  border-color: var(--vso-accent);
  color: var(--vso-accent);
  background-color: transparent;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.button:hover {
  background-color: var(--vso-accent);
  color: #ffffff;
}

/* Product Action Buttons - Dark Green Background with Bright Green Text */
.single_add_to_cart_button,
.product_type_simple.add_to_cart_button,
.product_type_variable.add_to_cart_button,
.add_to_cart_button,
.woocommerce-loop-product__link,
button.single_add_to_cart_button,
input.single_add_to_cart_button {
  background-color: #1a5c1a !important;
  color: #00ff00 !important;
  border-color: #1a5c1a !important;
  font-weight: 600 !important;
  padding: 0.4rem 0.8rem !important;
  font-size: 0.75rem !important;
  border-radius: 4px !important;
  width: auto !important;
  height: auto !important;
}

.single_add_to_cart_button:hover,
.product_type_simple.add_to_cart_button:hover,
.product_type_variable.add_to_cart_button:hover,
.add_to_cart_button:hover,
.woocommerce-loop-product__link:hover,
button.single_add_to_cart_button:hover,
input.single_add_to_cart_button:hover {
  background-color: #0f3f0f !important;
  color: #00ff00 !important;
  border-color: #0f3f0f !important;
}

/* Product Cards - Consistent Sizing */
.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  background-color: transparent !important;
}

.product-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.woocommerce-loop-product__title {
  flex-grow: 1;
}

/* Star ratings - consistent spacing */
.star-rating {
  min-height: 1.5rem;
}

/* Remove product info background */
.product-inner,
.product > div {
  background-color: transparent !important;
}

/* Product Title - White */
.woocommerce-loop-product__title,
.product-name,
h2.woocommerce-loop-product__title {
  color: #ffffff !important;
  border-bottom: none !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Price - Bright Green */
.price,
.woocommerce-Price-amount,
.amount {
  color: #00ff00 !important;
  font-weight: 600;
}

[data-theme="dark"] .woocommerce-loop-product__title,
[data-theme="dark"] .product-name,
[data-theme="dark"] h2.woocommerce-loop-product__title {
  color: #ffffff !important;
  border-bottom: none !important;
}

/* Product Borders - Remove Green */
.product {
  border: none !important;
  border-color: transparent !important;
}

.product img {
  border: none !important;
  border-color: transparent !important;
}

/* Remove all product styling */
.product:hover {
  border: none !important;
}

/* Headers */
h1, h2, h3 {
  position: relative;
  color: #333333 !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #ffffff !important;
}

/* Green accents on interactive elements */
.woocommerce-message {
  background-color: var(--vso-accent);
  color: #ffffff;
  border-left: 4px solid var(--vso-accent-dark);
}

/* Search bar focus */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus {
  border-color: var(--vso-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 204, 68, 0.1);
}

/* Single Product Page - Dark Mode */
[data-theme="dark"] .product-images,
[data-theme="dark"] .woocommerce-product-gallery {
  background-color: #1a1a1a !important;
}

.woocommerce-product-gallery,
.product-images {
  background-color: #1a1a1a !important;
}

[data-theme="dark"] .product-title,
[data-theme="dark"] h1.product_title,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-theme="dark"] .woocommerce-product-details__short-description,
[data-theme="dark"] .product-short-description,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div {
  color: #ffffff !important;
}

[data-theme="dark"] .product-info,
[data-theme="dark"] .product-summary,
[data-theme="dark"] .summary {
  padding-left: 2rem !important;
  margin-left: 2rem !important;
}

/* Button Styling - Smaller with radius */
.single_add_to_cart_button,
button.single_add_to_cart_button,
.add_to_cart_button,
.product_type_simple.add_to_cart_button,
.product_type_variable.add_to_cart_button,
.woocommerce-loop-product__link {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.75rem !important;
  border-radius: 4px !important;
  width: auto !important;
  height: auto !important;
  margin-top: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

/* Remove neon hover effects */
[data-theme="dark"] .product:hover {
  border-left-color: transparent !important;
}

/* Product description text - lighter in dark mode */
[data-theme="dark"] .product-short-description,
[data-theme="dark"] p {
  color: #d0d0d0 !important;
}

/* Smooth transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
