/*
Theme Name: Arabica Coffee Theme
Theme URI: www.arabicacoffee.coffee
Description: Custom WordPress theme for Arabica Coffee. Built with WP Builder Pro.
Version: 1.0.0
Author: WP Builder Pro
Author URI: https://wpbuilderpro.com
Text Domain: arabica-coffee-theme
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --primary: #2563eb;
  --secondary: #1e293b;
  --accent: #f97316;
  --footer-bg: #1e293b;
  --text: #374151;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
  --radius: 8px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, sans-serif;
  color: var(--secondary);
  line-height: 1.3;
  margin-bottom: 0.75em;
  font-weight: 700;
}

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

p { margin-bottom: 1.25em; color: var(--text); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent); }

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

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-content { min-height: calc(100vh - 300px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.site-logo img { max-height: 50px; width: auto; }
.site-logo .site-title-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 5px;
  align-items: center;
}

.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  background: var(--primary);
  color: #fff;
}

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  flex-direction: column;
  padding: 8px;
  z-index: 1001;
}

.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu a { padding: 8px 12px; font-size: 0.9rem; }

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-navigation ul { display: none; flex-direction: column; width: 100%; }
  .main-navigation.active ul { display: flex; }
  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 20px;
  }
  .header-inner { flex-wrap: wrap; }
}

/* ==========================================================================
   Hero / Page Header
   ========================================================================== */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 60px 0;
  text-align: center;
  position: relative;
  background-size: cover;
  background-position: center;
}
.page-header.has-hero-image {
  padding: 100px 0;
  background-blend-mode: overlay;
}
.page-header h1 { color: #fff; font-size: 2.5rem; margin-bottom: 0.3em; position: relative; z-index: 1; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.1rem; position: relative; z-index: 1; }

/* ==========================================================================
   Content
   ========================================================================== */
.page-content {
  padding: 60px 0;
}
.page-content h2 { color: var(--primary); margin-top: 1.5em; }
.page-content ul, .page-content ol {
  margin: 1em 0 1.5em 1.5em;
  color: var(--text);
}
.page-content li { margin-bottom: 0.5em; }

/* Buttons */
.btn, .wp-block-button__link {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover, .wp-block-button__link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 30px;
}

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

.footer-widget h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1em;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-widget ul { list-style: none; }
.footer-widget a { color: rgba(255,255,255,0.7); }
.footer-widget a:hover { color: var(--primary); }
.footer-widget li { margin-bottom: 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* ==========================================================================
   Utilities & Responsive
   ========================================================================== */
/* ==========================================================================
   Image Gallery / Placeholders
   ========================================================================== */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.image-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.image-gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }

.image-slot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  border: 2px dashed var(--border);
  aspect-ratio: 16/10;
}

.image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-slot .placeholder-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 15px;
}

.image-slot .placeholder-text svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.image-slot:has(img[src]:not([src=""])) .placeholder-text { display: none; }
.image-slot:has(img[src]:not([src=""])) { border-style: solid; border-color: transparent; }

@media (max-width: 768px) {
  .image-gallery { grid-template-columns: 1fr; }
  .image-gallery.cols-3, .image-gallery.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-form {
  max-width: 600px;
  margin: 30px 0;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

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

.contact-form .submit-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-form .submit-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.contact-form .form-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.contact-form .form-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.contact-form .form-message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #20ba5a;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg { width: 32px; height: 32px; fill: #fff; }

/* ==========================================================================
   Utilities & Responsive
   ========================================================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .page-header { padding: 40px 0; }
  .page-content { padding: 40px 0; }
}
