/*
Theme Name: Satyargold
Theme URI: https://satyargold.ir/
Template: astra
Description: پوستهٔ فرزند ساتیار گلد بر پایهٔ Astra: راست‌چین، با فونت وزیرمتن که روی همین سرور میزبانی می‌شود، و طراحی ساده و آرام برای فروشگاه زیورآلات طلا.
Author: ساتیار گلد
Author URI: https://satyargold.ir/
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: satyargold
*/

/* --------------------------------------------------------------------------
 * 1. Font: Vazirmatn 33.0.3 (SIL OFL 1.1), served from this theme only.
 *    See fonts/OFL.txt and fonts/README.txt.
 * ------------------------------------------------------------------------ */
@font-face {
	font-family: "Vazirmatn";
	src: url("fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
		url("fonts/Vazirmatn-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------------------
 * 2. Tokens. Colours come from the Astra global palette that functions.php
 *    sets (satyargold_palette()): 0 gold, 1 and 2 ink, 3 text, 4 white,
 *    5 ivory, 6 ink, 7 hairline, 8 muted text.
 *    Gold is never a text colour on light backgrounds (3.49:1 on white);
 *    it is used for borders, icons and button backgrounds with ink text.
 * ------------------------------------------------------------------------ */
:root {
	--sg-font: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
	--sg-gold: var(--ast-global-color-0);
	--sg-ink: var(--ast-global-color-2);
	--sg-text: var(--ast-global-color-3);
	--sg-white: var(--ast-global-color-4);
	--sg-ivory: var(--ast-global-color-5);
	--sg-hairline: var(--ast-global-color-7);
	--sg-muted: var(--ast-global-color-8);
	--sg-field: #8a8072; /* form-field borders: 3.88:1 on white, 3.66:1 on ivory */
	--sg-radius: 4px;
}

/* --------------------------------------------------------------------------
 * 3. Typography: Vazirmatn everywhere, no letter-spacing on Persian text.
 * ------------------------------------------------------------------------ */
body,
h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.woocommerce,
.woocommerce-page,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.wc-block-components-sidebar-layout,
.wc-block-mini-cart__drawer,
.wc-block-grid,
.wc-block-product-template,
.select2-container,
.select2-dropdown {
	font-family: var(--sg-font);
}

button,
input,
select,
textarea,
optgroup,
.button,
.ast-button,
.ast-custom-button,
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input {
	font-family: inherit;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.main-header-menu .menu-link,
.button,
.wp-element-button,
.wp-block-button__link {
	letter-spacing: normal;
}

/* --------------------------------------------------------------------------
 * 4. Links: ink text; a gold underline marks links inside content.
 * ------------------------------------------------------------------------ */
a {
	text-underline-offset: 0.3em;
}

.entry-content a:not(.wp-element-button):not(.wp-block-button__link):not(.button),
.woocommerce-product-details__short-description a,
.comment-content a {
	text-decoration-line: underline;
	text-decoration-color: var(--sg-gold);
	text-decoration-thickness: 1px;
}

.entry-content a:not(.wp-element-button):not(.wp-block-button__link):not(.button):hover,
.entry-content a:not(.wp-element-button):not(.wp-block-button__link):not(.button):focus,
.woocommerce-product-details__short-description a:hover,
.comment-content a:hover {
	text-decoration-thickness: 2px;
}

/* Navigation lists inside content (WooCommerce "My account") stay quiet. */
.entry-content .woocommerce-MyAccount-navigation a:not(.wp-element-button):not(.wp-block-button__link):not(.button) {
	text-decoration-line: none;
}

.entry-content .woocommerce-MyAccount-navigation a:not(.wp-element-button):not(.wp-block-button__link):not(.button):hover,
.entry-content .woocommerce-MyAccount-navigation .is-active a:not(.wp-element-button):not(.wp-block-button__link):not(.button) {
	text-decoration-line: underline;
	text-decoration-color: var(--sg-gold);
	text-decoration-thickness: 2px;
}

/* Focus ring (colour and style come from the Astra settings in functions.php). */
body :focus-visible {
	outline-width: 2px;
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * 5. Header: white bar, gold hairline (Astra settings), quiet menu with a
 *    gold underline for the hovered and the current item.
 * ------------------------------------------------------------------------ */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
	text-decoration: none;
}

.ast-desktop .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link,
.ast-desktop .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:focus-visible,
.ast-desktop .ast-builder-menu-1 .main-header-menu > .current-menu-item > .menu-link,
.ast-desktop .ast-builder-menu-1 .main-header-menu > .current-menu-ancestor > .menu-link {
	text-decoration-line: underline;
	text-decoration-color: var(--sg-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.65em;
}

.ast-builder-menu-1 .sub-menu {
	border-radius: 0 0 var(--sg-radius) var(--sg-radius);
}

/* Borderless cart icon: keep the icon box from stretching the header row. */
.ast-site-header-cart.ast-menu-cart-none .ast-addon-cart-wrap {
	line-height: 1;
}

/* --------------------------------------------------------------------------
 * 6. Buttons: small radius; colours come from the Astra settings
 *    (gold background with ink text, ink background with ivory text on hover).
 * ------------------------------------------------------------------------ */
.button,
.ast-button,
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button:not(.is-link) {
	border-radius: var(--sg-radius);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* --------------------------------------------------------------------------
 * 7. Form fields: borders meet 3:1 against white and ivory; gold on focus.
 * ------------------------------------------------------------------------ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea,
select,
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce-page form .form-row .input-text,
.select2-container--default .select2-selection--single {
	border-color: var(--sg-field);
	border-radius: var(--sg-radius);
	background-color: var(--sg-white);
	color: var(--sg-text);
}

input:focus,
textarea:focus,
select:focus,
.woocommerce form .form-row .input-text:focus {
	border-color: var(--sg-gold);
}

::placeholder {
	color: var(--sg-muted);
	opacity: 1;
}

/* Astra gives the header search placeholder the icon colour (gold, 3.49:1);
   placeholder text needs 4.5:1, so it uses the muted text colour (7.02:1). */
.ast-header-search .search-field::placeholder,
.ast-header-search .ast-search-menu-icon .search-form .search-field::placeholder {
	color: var(--sg-muted);
	opacity: 1;
}

/* --------------------------------------------------------------------------
 * 8. Footer: footer menu and Instagram icon in the white primary row,
 *    copyright in the ivory row below.
 * ------------------------------------------------------------------------ */
.site-footer .footer-nav-wrap .menu-link,
.site-footer .ast-footer-copyright {
	color: var(--sg-text);
}

.site-footer .footer-nav-wrap .menu-link:hover,
.site-footer .footer-nav-wrap .menu-link:focus-visible {
	color: var(--sg-ink);
	text-decoration-line: underline;
	text-decoration-color: var(--sg-gold);
	text-decoration-thickness: 2px;
}

.site-footer .ast-footer-copyright p {
	margin-bottom: 0;
}

.ast-footer-social-1-wrap .ast-builder-social-element {
	transition: background-color 0.2s ease;
}

/* --------------------------------------------------------------------------
 * 9. WooCommerce breadcrumb: Astra's #777 is 4.48:1 on white (below 4.5:1);
 *    the muted text colour is 7.02:1 on white and 6.62:1 on ivory.
 *    The .woocommerce-js selectors match Astra's own specificity.
 * ------------------------------------------------------------------------ */
.woocommerce-breadcrumb,
.woocommerce-breadcrumb a,
.woocommerce-js .woocommerce-breadcrumb,
.woocommerce-js .woocommerce-breadcrumb a {
	color: var(--sg-muted);
}
