/*
Theme Name: Hoco
Theme URI: https://hoco.tr
Author: Ahmet Seyhun
Description: Hoco.tr için özel WooCommerce teması
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.2
Text Domain: hoco
Tags: e-commerce, woocommerce, custom
*/

/* ==========================================================================
   1. Fontlar
   Font dosyaları assets/fonts/ altına konulduktan sonra bu blok açılır.
   Dosyalar gelene kadar sistem fontları devreye girer, site bozulmaz.
   ========================================================================== */

/*
@font-face {
	font-family: 'Archivo';
	src: url('assets/fonts/archivo-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Archivo';
	src: url('assets/fonts/archivo-800.woff2') format('woff2');
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Inter';
	src: url('assets/fonts/inter-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Inter';
	src: url('assets/fonts/inter-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Inter';
	src: url('assets/fonts/inter-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
*/

/* Cihaz seçici başlığına özel, self-host edilen tek ağırlık. Site genelinin
   tipografisini değiştirmez, sadece o bölümün vurgusu içindir. */
@font-face {
	font-family: 'Space Grotesk';
	src: url('assets/fonts/space-grotesk-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   2. Değişkenler
   ========================================================================== */

:root {
	/* Renk */
	--ink: #141414;
	--accent: #E11D2E;
	--accent-dark: #B7141F;
	--muted: #6B7280;
	--line: #E5E7EB;
	--bg: #FFFFFF;
	--bg-soft: #F7F7F8;

	/* Durum renkleri */
	--success: #0F7B44;
	--warning: #B45309;
	--error: #C81E1E;

	/* Tipografi */
	--font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--fs-xs: 0.75rem;    /* 12px */
	--fs-sm: 0.875rem;   /* 14px */
	--fs-base: 1rem;     /* 16px */
	--fs-lg: 1.125rem;   /* 18px */
	--fs-xl: 1.375rem;   /* 22px */
	--fs-2xl: 1.75rem;   /* 28px */
	--fs-3xl: 2.25rem;   /* 36px */
	--fs-4xl: 3rem;      /* 48px */

	--lh-tight: 1.15;
	--lh-snug: 1.35;
	--lh-base: 1.6;

	/* Boşluk, 8px tabanlı */
	--sp-1: 0.5rem;   /* 8 */
	--sp-2: 1rem;     /* 16 */
	--sp-3: 1.5rem;   /* 24 */
	--sp-4: 2rem;     /* 32 */
	--sp-5: 3rem;     /* 48 */
	--sp-6: 4rem;     /* 64 */
	--sp-7: 6rem;     /* 96 */

	/* Yapı */
	--container: 1280px;
	--gutter: var(--sp-2);
	--radius: 6px;
	--radius-lg: 12px;

	/* Katman sırası */
	--z-header: 100;
	--z-megamenu: 110;
	--z-mobilenav: 120;
	--z-modal: 200;

	/* Geçiş */
	--ease: 0.2s ease;
	--ease-out: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
	:root {
		--gutter: var(--sp-3);
		--fs-3xl: 2.75rem;
		--fs-4xl: 4rem;
	}
}

/* ==========================================================================
   3. Sıfırlama
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
	margin: 0;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

img,
picture,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* ==========================================================================
   4. Temel tipografi
   ========================================================================== */

body {
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: var(--lh-tight);
	letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p + p {
	margin-top: var(--sp-2);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

strong,
b {
	font-weight: 600;
}

small {
	font-size: var(--fs-sm);
	color: var(--muted);
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: var(--sp-4) 0;
}

/* ==========================================================================
   5. Yapı yardımcıları
   ========================================================================== */

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--sp-5);
}

@media (min-width: 768px) {
	.section {
		padding-block: var(--sp-6);
	}
}

/* Sert kenarlı bir renk bloğu yerine üstten/alttan yumuşakça beyaza karışan
   bir geçiş — tam genişlikte düz bir zemin sayfayı çizgi gibi bölüyormuş
   hissi veriyordu (kullanıcı geri bildirimi, 2026-09-02). */
.section--soft {
	background: linear-gradient(
		to bottom,
		transparent 0,
		var(--bg-soft) 64px,
		var(--bg-soft) calc(100% - 64px),
		transparent 100%
	);
}

/* ==========================================================================
   6. Butonlar
   Vurgu rengi yalnızca birincil butonda ve fiyatta kullanılır.
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-1);
	padding: 0.75rem 1.5rem;
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 600;
	line-height: 1;
	border-radius: var(--radius);
	border: 1px solid transparent;
	transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.btn:hover {
	text-decoration: none;
}

.btn--primary {
	background: var(--accent);
	color: #FFFFFF;
}

.btn--primary:hover {
	background: var(--accent-dark);
}

.btn--dark {
	background: var(--ink);
	color: #FFFFFF;
}

.btn--dark:hover {
	background: #000000;
}

.btn--outline {
	border-color: var(--ink);
	color: var(--ink);
}

.btn--outline:hover {
	background: var(--ink);
	color: #FFFFFF;
}

/* Koyu zeminler üzerinde kullanılır (ör. cihaz seçici paneli). */
.btn--light {
	background: #FFFFFF;
	color: var(--ink);
}

.btn--light:hover {
	background: var(--bg-soft);
}

.btn[disabled],
.btn.is-disabled {
	opacity: 0.45;
	pointer-events: none;
}

/* ==========================================================================
   7. Form
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.7rem 0.875rem;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition: border-color var(--ease);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--ink);
	outline: none;
}

label {
	display: block;
	margin-bottom: var(--sp-1);
	font-size: var(--fs-sm);
	font-weight: 500;
}

/* ==========================================================================
   8. Hareket
   Panel, sekme ve modal açılışlarında ortak kullanılan giriş animasyonu.
   ========================================================================== */

@keyframes hoco-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce-tabs .panel,
	.site-nav.is-open,
	.quick-view-modal__dialog {
		animation: none !important;
	}
}

/* ==========================================================================
   9. Erişilebilirlik
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--sp-2);
	z-index: var(--z-modal);
	padding: var(--sp-1) var(--sp-2);
	background: var(--ink);
	color: #FFFFFF;
	border-radius: var(--radius);
}

.skip-link:focus {
	top: var(--sp-1);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}