/*
Theme Name: Edgar Photography Theme
Theme URI: https://example.com/edgar-photography
Author: Edgar Photography
Author URI: https://example.com
Description: Custom premium photography portfolio theme for Edgar Photography.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gifts-shop
Tags: photography, portfolio, galleries, custom-post-types
*/

/* ====================================
   Variables CSS
   ==================================== */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --text-color: #333;
  --text-light: #777;
  --border-color: #ddd;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Georgia', serif;
}

/* ====================================
   Reset y Base
   ==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====================================
   Container & Grid
   ==================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.container-fluid {
  width: 100%;
  padding: 0 20px;
}

/* ====================================
   Header
   ==================================== */
.site-header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  left: 0;
  right: 0;
}

.header-top {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.9rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main {
  padding: 20px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.site-logo:hover {
  color: var(--secondary-color);
}

/* Navegación */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: var(--text-color);
  font-weight: 500;
  padding: 10px 0;
  display: block;
}

.main-navigation a:hover {
  color: var(--secondary-color);
}

.quote-cart {
  position: relative;
}

.quote-cart-button {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-cart-button:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.quote-cart-count {
  background-color: var(--accent-color);
  color: var(--white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ====================================
   Hero Section
   ==================================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-width: 200px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #c0392b;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* ====================================
   Secciones
   ==================================== */
.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ====================================
   Gallery Grid
   ==================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background-color: var(--bg-light);
}

.product-content {
  padding: 20px;
}

.product-sku {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.product-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tag {
  background-color: var(--bg-light);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--text-color);
}

.product-actions {
  display: flex;
  gap: 10px;
}

.btn-add-quote {
  flex: 1;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 10px;
  text-align: center;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-add-quote:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-add-quote.added {
  background-color: var(--success-color);
}

.btn-view-product {
  flex: 1;
  background-color: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  padding: 10px;
  text-align: center;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-view-product:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

/* ====================================
   Badges
   ==================================== */
.product-badges {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
}

.badge-new {
  background-color: var(--accent-color);
}

.badge-featured {
  background-color: var(--success-color);
}

/* ====================================
   Categories
   ==================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.category-card {
  position: relative;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px;
  color: var(--white);
}

.category-name {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.category-count {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ====================================
   Filtros Sidebar
   ==================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 40px;
}

.shop-sidebar {
  background-color: var(--bg-light);
  padding: 25px;
  border-radius: 10px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-section {
  margin-bottom: 30px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.filter-list {
  list-style: none;
}

.filter-list li {
  margin-bottom: 10px;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-color);
}

.filter-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.search-box {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
}

.search-box:focus {
  outline: none;
  border-color: var(--secondary-color);
}

/* ====================================
   Single Product
   ==================================== */
.product-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 40px 0;
}

.product-gallery {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.product-main-image {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.product-info h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.product-meta {
  margin: 20px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.product-category,
.product-sku-single {
  margin-bottom: 10px;
  color: var(--text-light);
}

.product-description-full {
  margin: 30px 0;
  line-height: 1.8;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  background-color: var(--bg-light);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.quantity-btn:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.quantity-input {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  height: 40px;
  font-size: 1rem;
}

/* ====================================
   Footer
   ==================================== */
.site-footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}

/* ====================================
   Contact Layout
   ==================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

@media (max-width: 992px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .contact-layout {
    gap: 30px;
  }
}

/* ====================================
   Formularios - Filas Responsive
   ==================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
  }
}

/* ====================================
   Formularios
   ==================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ====================================
   Alerts and Messages
   ==================================== */
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 992px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  
  .shop-sidebar {
    position: static;
  }
  
  .product-single {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .header-top {
    padding: 8px 0;
    font-size: 0.8rem;
  }
  
  .header-top .container {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  
  .header-main {
    padding: 15px 0;
  }
  
  .header-content {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: stretch;
  }
  
  .site-branding {
    width: 100%;
    text-align: center;
  }
  
  .site-logo {
    font-size: 1.3rem;
  }
  
  .main-navigation {
    width: 100%;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    text-align: left;
    width: 100%;
    padding: 0;
  }
  
  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  .main-navigation li:last-child {
    border-bottom: none;
  }
  
  .main-navigation a {
    padding: 12px 15px;
    display: block;
    width: 100%;
    color: var(--text-color);
    transition: var(--transition);
  }
  
  .main-navigation a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    padding-left: 20px;
  }
  
  .quote-cart {
    width: 100%;
  }
  
  .quote-cart-button {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
  
  .hero-section {
    padding: 50px 0;
  }
  
  .hero-content {
    padding: 0 15px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    min-width: unset;
    padding: 14px 20px;
    font-size: 1rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* ====================================
   Mobile Extra Small
   ==================================== */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .header-top {
    padding: 6px 0;
    font-size: 0.75rem;
  }
  
  .header-main {
    padding: 12px 0;
  }
  
  .header-content {
    gap: 12px;
  }
  
  .site-logo {
    font-size: 1.2rem;
  }
  
  .main-navigation a {
    padding: 14px 12px;
    font-size: 0.95rem;
  }
  
  .quote-cart-button {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
  
  .hero-section {
    padding: 40px 0;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }
  
  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  
  .hero-actions .btn {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
  
  /* Botones en general para móvil */
  .section .btn,
  .section a.btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
  }
  
  /* Botones dentro de contenedores centrados */
  [style*="text-align: center"] .btn,
  .section[style*="text-align: center"] .btn {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Contact - keep all content visible */
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 25px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .contact-layout > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Cajas de información de contacto */
  .contact-layout [style*="background-color"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
  }
  
  /* Asegurar que los textos no se corten */
  .contact-layout h2,
  .contact-layout h3,
  .contact-layout p,
  .contact-layout strong,
  .contact-layout a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  /* Listas en contacto */
  .contact-layout ul {
    padding-left: 20px;
    margin: 15px 0;
  }
  
  .contact-layout li {
    margin-bottom: 10px;
    word-wrap: break-word;
  }
  
  /* Responsive inquiry table */
  .quote-items-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 10px !important;
    margin: 0 -10px;
  }
  
  .quote-items-table table {
    width: 100%;
    min-width: 650px;
    font-size: 0.9rem;
  }
  
  .quote-items-table th {
    padding: 12px 10px !important;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  
  .quote-items-table td {
    padding: 15px 10px !important;
    font-size: 0.9rem;
  }
  
  .quote-items-table .product-info {
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
  }
  
  .quote-items-table .product-info img {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
  }
  
  .quote-items-table .product-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    line-height: 1.3;
  }
  
  .quote-items-table .product-info p {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .quote-items-table .quantity-controls {
    flex-wrap: nowrap;
  }
  
  .quote-items-table .btn-remove-from-quote {
    padding: 10px 12px !important;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ====================================
   Asegurar ancho completo en móvil
   ==================================== */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  
  .site-header {
    width: 100%;
    left: 0;
    right: 0;
  }
  
  .header-main .container {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
  }
}
