/*
Theme Name:  GT Art
Description: Mobile-first WooCommerce theme for gtart.in — custom string art portraits. Light background, gold accent, size collections, single/double/triple face options. Works with the String Art Photo Upload plugin.
Version:     2.4
Author:      Sampath (with Claude)
Requires PHP: 7.4
Text Domain: gt-art
*/

/* ============ Tokens ============ */
:root {
	--gold: #b8860b;        /* signature gold */
	--gold-dark: #96690a;
	--ink: #222222;
	--muted: #555555;
	--soft: #777777;
	--bg: #f7f7f7;
	--card: #ffffff;
	--line: #e3e3e3;
	--line-soft: #dddddd;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	background: var(--bg);
	color: var(--ink);
	line-height: 1.6;
	/* Mobile-first: the whole site sits in a phone-width column, centred. */
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

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

a { color: var(--gold); text-decoration: none; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }

/* ============ Header ============ */
.gt-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--line-soft);
}
.gt-logo {
	font-size: 24px;
	font-weight: bold;
	color: var(--gold);
	letter-spacing: 0.5px;
}
.gt-logo img { max-height: 40px; width: auto; display: inline-block; }
.gt-header-right { display: flex; align-items: center; gap: 14px; }
.gt-cart {
	position: relative;
	font-size: 22px;
	color: var(--ink);
	line-height: 1;
}
.gt-cart-count {
	position: absolute;
	top: -8px;
	right: -10px;
	background: var(--gold);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}
.gt-menu-btn {
	background: none;
	border: none;
	font-size: 22px;
	color: var(--ink);
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

/* Slide-down nav */
.gt-nav {
	display: none;
	background: #fff;
	border-bottom: 1px solid var(--line-soft);
}
.gt-nav.open { display: block; }
.gt-nav ul { list-style: none; margin: 0; padding: 6px 0; }
.gt-nav a {
	display: block;
	padding: 12px 18px;
	color: var(--ink);
	font-weight: 600;
	border-bottom: 1px solid #f1f1f1;
}
.gt-nav a:hover { color: var(--gold); background: #fbf7ee; }

/* ============ Buttons ============ */
.gt-btn,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce #respond input#submit {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--gold) !important;
	color: #fff !important;
	padding: 14px !important;
	border: none !important;
	border-radius: 10px !important;
	font-weight: bold !important;
	font-size: 16px !important;
	cursor: pointer;
	transition: background .2s ease;
	text-decoration: none;
}
.gt-btn:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover { background: var(--gold-dark) !important; color:#fff !important; }

.woocommerce .quantity input.qty { border:1px solid var(--line); border-radius:8px; padding:8px; }

/* ============ Hero ============ */
.gt-hero { padding: 16px; background: #fff; }
.gt-hero-banner {
	border-radius: 14px;
	overflow: hidden;
	background: #ececec;
	min-height: 190px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gt-hero-banner.placeholder {
	border: 2px dashed var(--gold);
	color: var(--gold-dark);
	font-weight: 600;
	letter-spacing: 1px;
}
.gt-hero h1 { font-size: 28px; margin: 16px 0 8px; }
.gt-hero .gt-desc { color: var(--muted); margin: 0 0 16px; }

/* ============ Sections ============ */
.gt-section { padding: 0 16px 20px; }
.gt-section-title { font-size: 22px; margin: 22px 0 12px; }

/* ============ Product grid ============ */
.woocommerce ul.products,
.gt-grid {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; display: none !important; }

.woocommerce ul.products li.product,
.gt-card {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,.05);
	text-align: left;
	padding: 0 !important;
}
.woocommerce ul.products li.product a img,
.gt-card img { border-radius: 0; margin: 0 0 0 0 !important; width: 100%; }

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px !important;
	font-weight: 700;
	color: var(--ink);
	padding: 10px 10px 2px !important;
	margin: 0;
}
.woocommerce ul.products li.product .price,
.gt-card .price {
	color: var(--gold) !important;
	font-weight: bold;
	font-size: 15px;
	display: block;
	padding: 0 10px 10px;
	margin: 0;
}
.woocommerce ul.products li.product .button {
	margin: 0 10px 12px !important;
	width: calc(100% - 20px);
	font-size: 14px !important;
	padding: 10px !important;
}
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
	background: var(--gold) !important;
	border-radius: 20px;
	min-height: auto;
	min-width: auto;
	padding: 4px 10px;
	font-size: 12px;
	line-height: 1.2;
}

/* Badge used on the homepage cards */
.gt-badge {
	display: inline-block;
	background: var(--gold);
	color: #fff;
	padding: 4px 8px;
	border-radius: 20px;
	font-size: 12px;
	margin: 10px 10px 0;
}
.gt-card .gt-info { padding: 0 0 4px; }
.gt-card .gt-name { font-weight: 700; padding: 6px 10px 2px; font-size: 15px; }

/* ============ Single product ============ */
.woocommerce div.product { padding: 16px; }
.woocommerce div.product .product_title { font-size: 24px; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--gold); font-weight: bold; font-size: 22px; }
.woocommerce div.product div.images img { border-radius: 12px; }

/* ============ Cart / checkout tidy on mobile ============ */
.woocommerce { padding: 0 16px; }
.woocommerce table.shop_table { border-radius: 10px; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { font-size: 16px !important; }

/* ============ Gallery (homepage showcase) ============ */
.gt-gallery {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.gt-gallery img,
.gt-gallery .ph {
	border-radius: 12px;
	aspect-ratio: 4/5;
	object-fit: cover;
	width: 100%;
	background: #ececec;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--soft);
	font-size: 12px;
	text-align: center;
	border: 1px solid var(--line);
}

/* ============ Footer ============ */
.gt-footer {
	padding: 24px 16px 32px;
	text-align: center;
	background: #fff;
	color: var(--soft);
	border-top: 1px solid var(--line-soft);
	margin-top: 10px;
}
.gt-footer .gt-foot-links { margin: 0 0 10px; }
.gt-footer .gt-foot-links a { margin: 0 8px; color: var(--muted); font-weight: 600; }
.gt-footer small { color: var(--soft); }

/* ============ Wider screens: keep the phone frame but breathe a little ============ */
@media (min-width: 481px) {
	body {
		box-shadow: 0 0 40px rgba(0,0,0,.08);
		min-height: 100vh;
	}
}

/* ============ v2.0 additions ============ */

/* "View & Order" button on shop/home cards (replaces Add to Cart) */
.woocommerce ul.products li.product .gt-select-btn,
.gt-select-btn {
	display:block; text-align:center; margin:0 10px 12px !important;
	width:calc(100% - 20px); background:var(--gold) !important; color:#fff !important;
	padding:10px !important; border-radius:8px !important; font-size:14px !important; font-weight:bold !important;
}
.gt-select-btn:hover { background:var(--gold-dark) !important; }

/* Buy Now button on single product (colour comes from Customizer, see wp_head) */
.gt-buy-now {
	display:block; width:100%; margin-top:12px !important; clear:both;
	color:#fff !important;
	padding:14px !important; border:none !important; border-radius:10px !important;
	font-weight:bold !important; font-size:16px !important; cursor:pointer;
}
.gt-buy-now:hover { filter:brightness(.92); }
.woocommerce div.product form.cart .button.gt-buy-now { float:none; }
/* Put Add to Cart on its own line so Buy Now drops below it with a gap */
.woocommerce div.product form.cart .single_add_to_cart_button { display:block; width:100%; float:none; }
.woocommerce div.product form.cart .quantity { margin-bottom:10px; }

/* About / contact page */
.gt-about-text { color:var(--muted); font-size:16px; margin:0 0 18px; }
.gt-contact-cards { display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.gt-contact-card {
	display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:12px;
	border:1px solid var(--line); background:#fff; color:var(--ink); font-weight:700; font-size:15px;
}
.gt-contact-card .ico { font-size:20px; }
.gt-contact-card.wa { background:#e8f7ee; border-color:#bfe6cd; color:#12662f; }
.gt-contact-card.em { background:#fbf5e7; border-color:#ecdcae; color:var(--gold-dark); }
.gt-contact-card.ph { background:#eef3fb; border-color:#cdd9ee; color:#274b8a; }
.gt-contact-card:hover { filter:brightness(.97); }

/* Footer contact row */
.gt-foot-contact { display:flex; justify-content:center; gap:16px; margin-bottom:12px; flex-wrap:wrap; }
.gt-foot-icon { color:var(--muted); font-weight:700; font-size:14px; }
.gt-foot-icon .gt-wa { color:#12662f; }

/* Gallery images from Customizer */
.gt-gallery img {
	border-radius:12px; aspect-ratio:4/5; object-fit:cover; width:100%;
	border:1px solid var(--line); background:#ececec;
}
