<?php
/**
 * Theme CSS — May Day gallery look (teal hero, red accents, card grid).
 *
 * @package Mayday
 */

:root {
  --mdp-header-bg: #ececeb;
  --mdp-primary: #77bacb;
  --mdp-secondary: #c73223;
  --mdp-tertiary: #63bbc5;
  --mdp-teal: #61a594;
  --mdp-teal-deep: #20705c;
  --mdp-white: #ffffff;
  --mdp-border: #9ca3af;
  --mdp-border-hover: #4b5563;
  --mdp-font-sans: "Ubuntu", system-ui, sans-serif;
  --mdp-font-serif: "Noto Serif", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.mdp-body {
  margin: 0;
  font-family: var(--mdp-font-sans);
  color: #111;
  background: var(--mdp-header-bg);
  line-height: 1.5;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

.mdp-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* —— Hero —— */
.mdp-hero {
  position: relative;
  background: var(--mdp-white);
  overflow: hidden;
}

.mdp-hero__media {
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 768px) {
  .mdp-hero__media {
    min-height: 320px;
  }
}

.mdp-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(97, 165, 148, 0) 0%,
    rgba(97, 165, 148, 0) 70%,
    rgba(97, 165, 148, 0.7) 100%
  );
  min-height: inherit;
}

.mdp-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .mdp-hero__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 4rem 0;
  }
}

.mdp-hero__title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--mdp-secondary);
  text-shadow: 0 3px 6px rgba(217, 241, 142, 0.99);
}

@media (min-width: 768px) {
  .mdp-hero__title {
    font-size: 2.75rem;
  }
}

.mdp-hero__nav a {
  color: var(--mdp-secondary);
  text-decoration: none;
  font-size: 1.125rem;
  transition: color 75ms ease;
}

.mdp-hero__nav a:hover {
  color: #15803d;
}

/* —— Main —— */
.mdp-main {
  padding: 0.75rem 0 2rem;
  background: var(--mdp-header-bg);
}

.mdp-site-content {
  background: var(--mdp-header-bg);
  min-height: 50vh;
}

/* —— Gallery grid —— */
.mdp-gallery ul.products,
ul.products.columns-3 {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
  float: none !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  .mdp-gallery ul.products,
  ul.products.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .mdp-gallery ul.products,
  ul.products.columns-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

ul.products li.product {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0.75rem;
  background: var(--mdp-white);
  border: 1px solid var(--mdp-border);
  transition: border-color 500ms ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

ul.products li.product:hover {
  border-color: var(--mdp-border-hover);
}

ul.products li.product.mdp-span-2 {
  grid-column: span 1;
}

@media (min-width: 640px) {
  ul.products li.product.mdp-span-2 {
    grid-column: span 2;
  }
}

ul.products li.product a {
  text-decoration: none;
  color: inherit;
}

ul.products li.product img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
}

ul.products li.product.mdp-mode-landscape img {
  aspect-ratio: 16 / 10;
}

.mdp-product-card__title,
ul.products li.product .mdp-product-card__title {
  margin: 0.5rem 0 0;
  padding-top: 0.25rem;
  border-top: 1px solid #000;
  font-size: 1.125rem;
  font-weight: 700;
}

.mdp-product-card__details {
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.25rem;
  display: inline-block;
}

/* —— Prices —— */
.mdp-price {
  margin: 0.25rem 0;
}

.mdp-price--sold {
  background: #ef4444;
  color: #fff;
  padding: 0.125rem 0.5rem;
  display: inline-block;
}

.mdp-price__regular--struck {
  text-decoration: line-through;
}

.mdp-price__regular--sale-base {
  color: #ef4444;
}

.mdp-price__sale {
  font-weight: 500;
}

.mdp-price__sold-label {
  font-weight: 700;
}

/* —— Single product —— */
.mdp-single .product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  background: var(--mdp-white);
}

@media (min-width: 640px) {
  .mdp-single .product {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.mdp-single .woocommerce-product-gallery {
  margin: 0;
}

.mdp-single .summary {
  margin: 0;
  padding: 0 1rem 1rem;
}

.mdp-single .product_title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.mdp-contact-line {
  margin-top: 1rem;
}

.mdp-link {
  text-decoration: underline;
}

.mdp-artist {
  margin-top: 0.75rem;
}

.mdp-artist__logo {
  width: 48px;
  height: auto;
}

/* —— Footer —— */
.mdp-footer {
  border-top: 1px solid var(--mdp-tertiary);
  background: linear-gradient(to bottom, #63bbc5, #20705c);
  color: #fff;
}

.mdp-footer__inner {
  position: relative;
  padding: 1.5rem 0 2.5rem;
}

@media (min-width: 768px) {
  .mdp-footer__inner {
    padding: 2.5rem 0;
  }
}

.mdp-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .mdp-footer__grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
}

.mdp-footer__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mdp-secondary);
  text-shadow: 0 3px 6px rgba(97, 165, 148, 0.99);
}

@media (min-width: 1024px) {
  .mdp-footer__heading {
    justify-content: flex-start;
    font-size: 2.5rem;
  }
}

.mdp-footer__logo {
  width: 100px;
  height: auto;
}

.mdp-footer__contact a {
  color: #fff;
  text-decoration: underline;
}

/* —— Woo notices / cart / checkout basics —— */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  max-width: 1280px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.woocommerce-cart .mdp-container,
.woocommerce-checkout .mdp-container,
.woocommerce-account .mdp-container {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  background: var(--mdp-white);
}

.button,
button.button,
a.button,
input.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: linear-gradient(to bottom, #61a594, #20705c) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 2px;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  filter: brightness(1.05);
}

/* Breadcrumbs */
.woocommerce-breadcrumb {
  max-width: 1280px;
  margin: 0.75rem auto;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #555;
}

.woocommerce-breadcrumb a {
  color: var(--mdp-teal-deep);
}
