/*
Theme Name:   Granley Goods (Astra Child)
Description:  Child theme of Astra for Granley Goods — handmade ceramics by Gretchen Amsley.
Template:     astra
Version:      1.1.0
Text Domain:  granleygoods
*/

/* ==========================================================================
   Brand tokens — drawn from granley-logo.png and the glazes in the work
   ========================================================================== */
:root {
	--gg-mauve:       #7a6569;  /* logo background */
	--gg-mauve-deep:  #5c4a4e;
	--gg-mauve-soft:  #b8a8aa;
	--gg-sea:         #93bfc9;  /* logo vase / "Goods" */
	--gg-sea-soft:    #dcebee;
	--gg-sea-deep:    #4f8794;  /* accessible on light backgrounds */
	--gg-rust:        #a65f3c;  /* iron-red glaze accent */
	--gg-oat:         #f6f1eb;  /* page background, like raw clay */
	--gg-sand:        #ece3d9;
	--gg-ink:         #3a2f31;
	--gg-text:        #4d4245;
	--gg-white:       #ffffff;

	--gg-font-display: "Abril Fatface", "Playfair Display", Georgia, serif;
	--gg-font-body:    "Karla", "Helvetica Neue", Arial, sans-serif;

	--gg-radius:  14px;
	--gg-radius-blob: 46% 54% 52% 48% / 55% 45% 55% 45%;
	--gg-shadow:  0 18px 40px -22px rgba(58, 47, 49, .45);
	--gg-gutter:  clamp(16px, 4vw, 48px);
}

/* ==========================================================================
   Base
   ========================================================================== */
body,
.ast-separate-container,
.ast-plain-container {
	background-color: var(--gg-oat);
}
body,
button, input, select, textarea,
.ast-button, .ast-custom-button {
	font-family: var(--gg-font-body);
	color: var(--gg-text);
}
body { font-size: 18px; line-height: 1.7; }

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.woocommerce-loop-product__title,
.product_title {
	font-family: var(--gg-font-display);
	font-weight: 400;
	color: var(--gg-ink);
	letter-spacing: .005em;
	line-height: 1.15;
}
h1, .entry-title { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

a { color: var(--gg-sea-deep); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--gg-mauve); }

::selection { background: var(--gg-sea); color: var(--gg-ink); }

.gg-eyebrow {
	font-family: var(--gg-font-body);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--gg-rust);
	margin-bottom: .6em;
}

/* ==========================================================================
   Buttons (core blocks, WooCommerce, our own)
   ========================================================================== */
.wp-block-button__link,
.gg-button,
.ast-button,
.button,
button[type="submit"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .button.alt,
.woocommerce-page a.button {
	font-family: var(--gg-font-body) !important;
	font-weight: 700 !important;
	font-size: .85rem !important;
	letter-spacing: .14em !important;
	text-transform: uppercase !important;
	background: var(--gg-mauve) !important;
	color: var(--gg-white) !important;
	border: 2px solid var(--gg-mauve) !important;
	border-radius: 999px !important;
	padding: .95em 2em !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
	display: inline-block;
}
.wp-block-button__link:hover,
.gg-button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .button.alt:hover {
	background: var(--gg-mauve-deep) !important;
	border-color: var(--gg-mauve-deep) !important;
	color: var(--gg-white) !important;
	transform: translateY(-1px);
}
.is-style-outline > .wp-block-button__link,
.gg-button--outline {
	background: transparent !important;
	color: var(--gg-mauve) !important;
}
.is-style-outline > .wp-block-button__link:hover,
.gg-button--outline:hover {
	background: var(--gg-mauve) !important;
	color: var(--gg-white) !important;
}
/* light buttons on dark (mauve) panels */
.gg-on-dark .wp-block-button__link,
.gg-button--light {
	background: var(--gg-sea) !important;
	border-color: var(--gg-sea) !important;
	color: var(--gg-ink) !important;
}
.gg-on-dark .wp-block-button__link:hover,
.gg-button--light:hover {
	background: var(--gg-white) !important;
	border-color: var(--gg-white) !important;
	color: var(--gg-ink) !important;
}
.gg-on-dark .is-style-outline > .wp-block-button__link {
	background: transparent !important;
	border-color: var(--gg-white) !important;
	color: var(--gg-white) !important;
}
.gg-on-dark .is-style-outline > .wp-block-button__link:hover {
	background: var(--gg-white) !important;
	color: var(--gg-ink) !important;
}

/* ==========================================================================
   Header
   ========================================================================== */
.ast-primary-header-bar,
.main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar {
	background-color: var(--gg-mauve) !important;
	border-bottom: 0 !important;
}
.ast-primary-header-bar .site-primary-header-wrap { min-height: 96px; }
.site-header .custom-logo-link img { border-radius: 10px; }

.main-header-menu .menu-link,
.ast-header-break-point .main-header-menu .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link {
	font-family: var(--gg-font-body);
	font-weight: 700;
	font-size: .82rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gg-white) !important;
}
.ast-builder-menu-1 .menu-item > .menu-link:hover,
.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-1 .menu-item.current_page_item > .menu-link {
	color: var(--gg-sea) !important;
}
.ast-builder-menu-1 .menu-item > .menu-link { position: relative; }
.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 50%; bottom: 8px;
	width: 6px; height: 6px;
	margin-left: -3px;
	border-radius: 50%;
	background: var(--gg-sea);
}

/* Cart / account icons */
.ast-site-header-cart .ast-cart-menu-wrap .count,
.ast-site-header-cart i.astra-icon,
.ast-header-woo-cart .ast-icon svg,
.ast-header-account svg,
.ast-header-account-wrap .ast-header-account-link { color: var(--gg-white); fill: var(--gg-white); }
.ast-site-header-cart i.astra-icon::after { background: var(--gg-sea) !important; color: var(--gg-ink) !important; }

/* Mobile menu */
.ast-mobile-header-wrap .menu-toggle,
.ast-mobile-header-wrap .menu-toggle .ast-mobile-svg { color: var(--gg-white) !important; fill: var(--gg-white) !important; background: transparent !important; }
.ast-mobile-popup-drawer .ast-mobile-popup-inner,
.ast-header-break-point .main-header-bar-navigation,
.ast-mobile-header-content { background: var(--gg-mauve-deep) !important; }
.ast-mobile-header-content .menu-link,
.ast-mobile-popup-drawer .menu-link { color: var(--gg-white) !important; border-color: rgba(255,255,255,.12) !important; }

/* ==========================================================================
   Page layout tweaks
   ========================================================================== */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .comments-area,
.ast-separate-container .ast-woocommerce-container {
	background: transparent;
	padding-left: 0; padding-right: 0;
}
.ast-plain-container .site-content > .ast-container { max-width: 1240px; }

/* Interior page header band */
.page:not(.home) .entry-header { text-align: center; margin-bottom: 2.5rem; }
.page:not(.home) .entry-title::after {
	content: "";
	display: block;
	width: 64px; height: 4px;
	margin: .5em auto 0;
	border-radius: 4px;
	background: var(--gg-sea);
}

/* Full-bleed sections on the stretched Home page */
.gg-section { padding-block: clamp(56px, 9vw, 120px); }
.gg-section > .wp-block-group__inner-container,
.gg-section.is-layout-constrained > * { padding-inline: var(--gg-gutter); }
.gg-bg-mauve { background: var(--gg-mauve); }
.gg-bg-sea   { background: var(--gg-sea-soft); }
.gg-bg-sand  { background: var(--gg-sand); }
.gg-bg-white { background: var(--gg-white); }
.gg-on-dark, .gg-on-dark p { color: rgba(255,255,255,.88); }
.gg-on-dark h1, .gg-on-dark h2, .gg-on-dark h3 { color: var(--gg-white); }
.gg-on-dark .gg-eyebrow { color: var(--gg-sea); }

.gg-center { text-align: center; }
.gg-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 720px; margin-inline: auto; }

/* ==========================================================================
   Home — hero
   ========================================================================== */
.gg-hero { background: var(--gg-mauve); margin-bottom: 0 !important; }
.gg-hero.wp-block-media-text { grid-template-columns: 1fr 1fr !important; min-height: min(88vh, 820px); }
.gg-hero .wp-block-media-text__content { padding: clamp(40px, 7vw, 110px) clamp(24px, 6vw, 96px) !important; }
.gg-hero h1 {
	color: var(--gg-white);
	font-size: clamp(2.6rem, 5.4vw, 4.6rem);
	line-height: 1.04;
	margin-bottom: .35em;
}
.gg-hero h1 em { font-style: normal; color: var(--gg-sea); }
.gg-hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 30em; }
.gg-hero .wp-block-media-text__media { align-self: stretch; height: 100%; }
.gg-hero .wp-block-media-text__media img { height: 100%; min-height: 420px; object-fit: cover; }

/* ==========================================================================
   Home — collection cards
   ========================================================================== */
.gg-cards { gap: clamp(20px, 3vw, 40px) !important; }
.gg-card {
	background: var(--gg-white);
	border-radius: var(--gg-radius);
	overflow: hidden;
	box-shadow: var(--gg-shadow);
	transition: transform .3s ease, box-shadow .3s ease;
	padding-bottom: 1.5rem;
}
.gg-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -24px rgba(58,47,49,.55); }
.gg-card figure { margin: 0 0 1.25rem !important; }
.gg-card img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; display: block; }
.gg-card h3, .gg-card p { padding-inline: 1.5rem; }
.gg-card h3 { margin-bottom: .3em; }
.gg-card h3 a, .gg-card h3 a:hover { color: var(--gg-ink); text-decoration: none !important; }
.gg-card h3 a:hover { color: var(--gg-sea-deep); }
.gg-card p { font-size: 1rem; margin-bottom: 0; }

/* ==========================================================================
   Studio / split sections
   ========================================================================== */
.gg-split .wp-block-media-text__media img {
	border-radius: var(--gg-radius-blob);
	box-shadow: var(--gg-shadow);
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
.gg-split .wp-block-media-text__content { padding: 0 clamp(16px, 5vw, 72px) !important; }
.gg-split.is-image-fill .wp-block-media-text__media { border-radius: var(--gg-radius-blob); }

/* Simple process list */
.gg-steps { list-style: none; padding: 0; margin: 1.5em 0; counter-reset: gg-step; }
.gg-steps li {
	counter-increment: gg-step;
	position: relative;
	padding: 0 0 1em 3.2em;
}
.gg-steps li::before {
	content: counter(gg-step);
	position: absolute; left: 0; top: -.1em;
	width: 2.1em; height: 2.1em;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--gg-sea);
	color: var(--gg-ink);
	font-family: var(--gg-font-display);
}

/* Quote */
.gg-quote {
	border: 0 !important;
	text-align: center;
	max-width: 820px;
	margin-inline: auto !important;
	padding: 0 !important;
}
.gg-quote p {
	font-family: var(--gg-font-display);
	font-size: clamp(1.6rem, 3vw, 2.3rem);
	line-height: 1.3;
	color: var(--gg-ink);
}
.gg-quote cite {
	font-style: normal;
	font-size: .8rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--gg-rust);
}

/* ==========================================================================
   Gallery page
   ========================================================================== */
.wp-block-gallery.gg-gallery { gap: 18px !important; justify-content: center; }
/* keep a lone last item the same size as its row-mates instead of stretching */
.wp-block-gallery.gg-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { flex-grow: 0; }
.wp-block-gallery.gg-gallery.has-nested-images.is-cropped figure.wp-block-image img { aspect-ratio: 4 / 5; }
.wp-block-gallery.gg-gallery.columns-1 { max-width: 900px; margin-inline: auto; }
.wp-block-gallery.gg-gallery.columns-1 figure.wp-block-image img { aspect-ratio: 4 / 3 !important; }
.wp-block-gallery.gg-gallery .wp-block-image img {
	border-radius: 10px;
	transition: transform .4s ease, filter .4s ease;
}
.wp-block-gallery.gg-gallery .wp-block-image { overflow: hidden; border-radius: 10px; }
.wp-block-gallery.gg-gallery .wp-block-image:hover img { transform: scale(1.04); }
.wp-block-gallery.gg-gallery figcaption {
	background: linear-gradient(0deg, rgba(58,47,49,.75), transparent) !important;
	font-size: .85rem !important;
	letter-spacing: .04em;
	border-radius: 0 0 10px 10px;
}
.gg-gallery-heading { margin-top: 2.5em !important; }

/* ==========================================================================
   Instagram section
   ========================================================================== */
.gg-instagram__grid {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.gg-instagram__grid li { margin: 0; }
.gg-instagram__grid a { display: block; overflow: hidden; border-radius: 10px; position: relative; }
.gg-instagram__grid img {
	display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
	transition: transform .4s ease;
}
.gg-instagram__grid a::after {
	content: "";
	position: absolute; inset: 0;
	background: var(--gg-mauve);
	opacity: 0;
	transition: opacity .3s ease;
}
.gg-instagram__grid a:hover img { transform: scale(1.05); }
.gg-instagram__grid a:hover::after { opacity: .25; }
.gg-instagram__follow { text-align: center; margin: 2rem 0 0; }
#sb_instagram { margin-top: 1.5rem; }

/* ==========================================================================
   WooCommerce
   ========================================================================== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: var(--gg-white);
	border-radius: var(--gg-radius);
	padding: 0 0 1.4rem !important;
	overflow: hidden;
	box-shadow: var(--gg-shadow);
	text-align: center;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce ul.products li.product a img {
	aspect-ratio: 1; object-fit: cover; margin-bottom: 1rem !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.25rem !important; color: var(--gg-ink); }
.woocommerce ul.products li.product .astra-shop-summary-wrap { padding: 0 1.2rem; text-align: center; }
.woocommerce ul.products li.product .astra-shop-summary-wrap > * { margin-inline: auto; }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .yith-wcqv-button {
	display: block !important;
	width: calc(100% - 2.4rem) !important;
	margin: .6rem auto 0 !important;
	text-align: center;
}
.woocommerce ul.products li.product .yith-wcqv-button {
	background: transparent !important;
	color: var(--gg-mauve) !important;
}
.woocommerce ul.products li.product .yith-wcqv-button:hover { background: var(--gg-mauve) !important; color: #fff !important; }
.woocommerce ul.products li.product .ast-woo-product-category { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; color: var(--gg-rust); }
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--gg-mauve) !important; font-weight: 700; }
.woocommerce span.onsale, .woocommerce ul.products li.product .onsale {
	background: var(--gg-rust) !important; color: #fff !important; border-radius: 999px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--gg-mauve); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active::before { background: var(--gg-mauve); }
.woocommerce div.product div.images img { border-radius: var(--gg-radius); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--gg-sea-deep) !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--gg-sea-deep) !important; }
.woocommerce .star-rating span::before { color: var(--gg-rust); }

/* ==========================================================================
   Footer
   ========================================================================== */
.gg-footer {
	background: var(--gg-mauve-deep);
	color: rgba(255,255,255,.82);
	padding: clamp(48px, 7vw, 88px) var(--gg-gutter);
}
.gg-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr;
	gap: clamp(28px, 5vw, 72px);
}
.gg-footer h4 {
	color: var(--gg-sea);
	font-family: var(--gg-font-body);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	margin-bottom: 1em;
}
.gg-footer p { font-size: 1rem; }
.gg-footer__logo { width: 150px; height: auto; border-radius: 10px; margin-bottom: 1rem; }
.gg-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.gg-footer__nav li { margin-bottom: .45em; }
.gg-footer__nav a { color: var(--gg-white); text-decoration: none; }
.gg-footer__nav a:hover { color: var(--gg-sea); }

.site-footer, .site-primary-footer-wrap, .site-below-footer-wrap,
.ast-builder-grid-row-container.ast-builder-grid-row-tablet-full { background-color: var(--gg-ink) !important; border-top: 0 !important; }
.site-below-footer-wrap .ast-footer-copyright,
.site-below-footer-wrap .ast-footer-copyright p { color: rgba(255,255,255,.6); font-size: .85rem; letter-spacing: .04em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
	.gg-footer__inner { grid-template-columns: 1fr 1fr; }
	.gg-footer__brand { grid-column: 1 / -1; }
	.gg-instagram__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 781px) {
	.gg-hero.wp-block-media-text { grid-template-columns: 1fr !important; min-height: 0; }
	.gg-hero .wp-block-media-text__media img { min-height: 340px; max-height: 60vh; }
	.gg-split .wp-block-media-text__content { padding: 2rem 0 0 !important; }
}
@media (max-width: 560px) {
	body { font-size: 17px; }
	.gg-footer__inner { grid-template-columns: 1fr; }
}
