/* FreshCart Application Styles
 * Brand-specific overrides and additions
 * Generated by h9 brand launcher
 * 
 * Note: All component CSS files are loaded individually via stylesheet_link_tag 
 * in application.html.erb to ensure proper digest hash handling by Propshaft.
 * DO NOT use @import statements here as they cause 404 errors.
 */

/* =========================================================
 * Font Definitions
 * ========================================================= */

@font-face {
  font-family: 'Galano Grotesque Alt';
  src: url("/fonts/GalanoGrotesqueAltRegular.otf") format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Galano Grotesque Alt';
  src: url("/fonts/GalanoGrotesqueAltMedium.otf") format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Galano Grotesque Alt';
  src: url("/fonts/GalanoGrotesqueAltSemiBold.otf") format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Galano Grotesque Alt';
  src: url("/fonts/GalanoGrotesqueAltBold.otf") format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Galano Grotesque Alt';
  src: url("/fonts/GalanoGrotesqueAltLight.otf") format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}


/* =========================================================
 * Brand Color Variables
 * ========================================================= */

:root {
  /* Primary Colors */
  --color-brand: #2B504C;
  --color-brand-dark: #042925;
  --color-brand-light: #517672;
  --color-brand-rgb: 43, 80, 76;
  --color-brand-dark-rgb: 4, 41, 37;
  --color-brand-light-rgb: 81, 118, 114;
  
  /* Legacy variable names (for engine compatibility) */
  --color-nava: #2B504C;
  --color-nava-dark: #042925;
  --color-nava-light: #517672;
  --color-nava-pressed: #00100c;
  --color-nava-active: #000000;
  
  /* Button aliases (engine CSS uses these) */
  --brand: #2B504C;
  --brand-hover: #042925;
  --brand-light: #517672;
  
  /* Secondary Colors */
  --color-brand-secondary: #79BC37;
  --color-brand-secondary-dark: #529510;
  --color-brand-secondary-light: #9fe25d;
  --color-brand-secondary-rgb: 121, 188, 55;
  --color-brand-secondary-dark-rgb: 82, 149, 16;
  --color-brand-secondary-light-rgb: 159, 226, 93;
  
  /* Neutrals */
  --brand-white: #FFFFFF;
  --brand-light-gray: #F5F5F5;
  --brand-gray: #666666;
  --brand-dark-gray: #333333;
  --brand-black: #000000;
  
  /* Typography */
  --font-primary: 'Galano Grotesque Alt', sans-serif;
  --font-display: 'Galano Grotesque Alt', sans-serif;
  --font-body: 'Galano Grotesque Alt', sans-serif;
}

/* =========================================================
 * Brand-Specific Overrides
 * ========================================================= */

.freshcart-logo {
  /* Custom logo styles */
}

.freshcart-banner {
  /* Custom banner styles */
}

/* Primary buttons use brand color */
.btn-primary,
button[type="submit"]:not(.btn-secondary),
.add-to-cart-btn {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
}

.btn-primary:hover,
button[type="submit"]:not(.btn-secondary):hover,
.add-to-cart-btn:hover {
  background-color: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
}

/* Links use brand color */
/* Use :where() so this stays low-specificity and doesn't override component CTAs/pills. */
a:where(:not(.btn)) {
  color: var(--color-brand);
}

a:where(:not(.btn)):hover {
  color: var(--color-brand-dark);
}

/* Header icon color */
.navigation-header__icon-link {
  color: var(--color-brand-secondary);
}

/* Top info bar hover should remain readable */
.top-info-bar__link:hover {
  color: var(--brand-white);
}

.top-info-bar__link:active {
  color: var(--brand-white);
}

/* Category pills (avoid global link overrides) */
a.category-page__pill {
  color: var(--brand-black);
}

a.category-page__pill.category-page__pill--active {
  color: var(--brand-white);
}

/* Order confirmation CTA link color */
a.order-details__continue-btn {
  color: var(--brand-white);
}

/* Buying bulk link color (ensure contrast on mobile CTA) */
a.product-detail__bulk-link {
  color: var(--color-nava);
}

@media (max-width: 767px) {
  a.product-detail__bulk-link {
    color: var(--brand-white);
  }
}

/* Cart remove button should not be filled */
.cart-item__remove {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Force secure payments icon to brand color (overrides inline SVG) */
.product-detail__feature--secure .product-detail__feature-icon {
  color: var(--color-nava);
}

.product-detail__feature--secure .product-detail__feature-icon path,
.product-detail__feature--secure .product-detail__feature-icon rect,
.product-detail__feature--secure .product-detail__feature-icon line,
.product-detail__feature--secure .product-detail__feature-icon polyline,
.product-detail__feature--secure .product-detail__feature-icon polygon,
.product-detail__feature--secure .product-detail__feature-icon circle {
  stroke: var(--color-nava) !important;
}

.product-detail__feature--secure .product-detail__feature-icon circle {
  fill: var(--color-nava) !important;
}

/* Bulk order CTA button uses brand colors (overrides inline styles) */
.bulk-order-page input[type="submit"],
.bulk-order-page button[type="submit"] {
  background: var(--color-nava) !important;
  background-color: var(--color-nava) !important;
  border-color: var(--color-nava) !important;
}

.bulk-order-page input[type="submit"]:hover,
.bulk-order-page button[type="submit"]:hover,
.bulk-order-page input[type="submit"]:focus,
.bulk-order-page button[type="submit"]:focus {
  background: var(--color-nava-dark) !important;
  background-color: var(--color-nava-dark) !important;
  border-color: var(--color-nava-dark) !important;
}
