/*
Theme Name: Ruby Hyper Market
Theme URI: https://rubyhypermarket.com
Author: Antigravity AI
Author URI: https://rubyhypermarket.com
Description: Complete, production-ready, local SEO-optimized custom theme for Ruby Hyper Market in Perambra, Kozhikode. Includes full 18+ page architecture, exact byte-for-byte NAP consistency, structured JSON-LD schema, and Client Admin CMS.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ruby-hyper-market
Tags: grocery, supermarket, hypermarket, local-seo, kozhikode, perambra, custom-menu, featured-images, responsive-layout
*/

/* ==========================================================================
   Ruby Hyper Market — Premium Design System & CSS Stylesheet
   Location: Perambra, Kozhikode district, Kerala, 673525
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #d1fae5;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-dark: #0f172a;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(5, 150, 105, 0.15);
  --transition: all 0.3s ease-in-out;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 70px; /* Space for mobile floating CTA bar */
}

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

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

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

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

.section-title-wrap {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title-wrap .subtitle {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  display: block;
}

.section-title-wrap h2 {
  font-size: 2rem;
  color: var(--text-dark);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Announcement Ticker Bar */
.top-announcement-bar {
  background: linear-gradient(90deg, #047857 0%, #059669 50%, #10b981 100%);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-announcement-bar .ticker-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
}

.top-announcement-bar .contact-quick {
  display: flex;
  gap: 1.25rem;
}

.top-announcement-bar a {
  color: #ffffff;
  font-weight: 600;
}

/* Header & Navbar */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #1da851;
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 4rem 0 5rem 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  color: #ffffff;
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
}

.hero-content .highlight {
  color: var(--accent);
}

.hero-content p {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.hero-image-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.hero-trust-badges {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.trust-badge-item svg {
  color: var(--accent);
}

/* Featured Categories Grid */
.categories-section {
  padding: 4.5rem 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.category-card-img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.category-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.category-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Offers & Deals Grid */
.offers-section {
  background: #f1f5f9;
  padding: 4.5rem 0;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.offer-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
}

.offer-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.offer-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.offer-img {
  height: 190px;
  width: 100%;
  object-fit: cover;
}

.offer-body {
  padding: 1.25rem;
}

.offer-discount-tag {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.offer-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.offer-date {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

/* Store Features Bar */
.features-bar {
  padding: 3rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}

.feature-item-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  font-size: 1.5rem;
}

/* Location Card & Map Section */
.location-section {
  padding: 4.5rem 0;
}

.nap-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.nap-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.nap-item svg {
  color: var(--primary);
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

.map-responsive {
  width: 100%;
  height: 350px;
  border-radius: var(--radius-md);
  border: 0;
}

/* Blog Hub Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.blog-card-body {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 240px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: #ffffff;
}

/* Admin CMS Panel */
.admin-header {
  background: var(--dark-surface);
  color: #ffffff;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.admin-tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}

.admin-tab-btn.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th, .admin-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: #f1f5f9;
  color: var(--text-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Mobile Floating CTA Bar */
.mobile-floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  z-index: 9999;
  border-top: 1px solid var(--border-color);
}

.mobile-floating-cta a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.25rem;
  color: var(--text-dark);
}

.mobile-floating-cta a.btn-call {
  background: var(--primary);
  color: #ffffff;
}

.mobile-floating-cta a.btn-whatsapp-mob {
  background: #25d366;
  color: #ffffff;
}

.mobile-floating-cta a.btn-maps {
  background: var(--accent);
  color: #ffffff;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 4rem 0 2rem 0;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* Responsiveness */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .mobile-floating-cta {
    display: grid;
  }

  .top-announcement-bar .contact-quick {
    display: none;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
}
