/*
Theme Name: Creemly
Theme URI: https://creemly.com/
Author: Creemly
Author URI: https://creemly.com/
Description: A modern WooCommerce marketplace theme for local tiffin services.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: creemly
Tags: ecommerce, woocommerce, marketplace, food, tiffin
*/

/* --------------------------------------------------------------
   1. CSS Variables
-------------------------------------------------------------- */

:root {
	--creemly-primary: #00a499;
	--creemly-primary-dark: #007f77;
	--creemly-secondary: #f5f5f5;
	--creemly-dark: #222222;
	--creemly-text: #444444;
	--creemly-muted: #777777;
	--creemly-white: #ffffff;
	--creemly-border: #e5e5e5;
	--creemly-danger: #d63638;
	--creemly-success: #168a45;

	--creemly-container: 1240px;
	--creemly-radius: 8px;
	--creemly-transition: 0.25s ease;
}

/* --------------------------------------------------------------
   2. Reset
-------------------------------------------------------------- */

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

html {
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background: var(--creemly-white);
	color: var(--creemly-text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--creemly-transition);
}

button,
input,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

/* --------------------------------------------------------------
   3. Typography
-------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 0;
	color: var(--creemly-dark);
	font-family: "PT Sans", sans-serif;
	font-weight: 700;
	line-height: 1.2;
}

h1 {
	font-size: 64px;
}

h2 {
	font-size: 48px;
}

h3 {
	font-size: 32px;
}

h4 {
	font-size: 26px;
}

h5 {
	font-size: 22px;
}

h6 {
	font-size: 18px;
}

p {
	margin-top: 0;
	margin-bottom: 1rem;
}

/* --------------------------------------------------------------
   4. Accessibility
-------------------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed !important;
	top: 10px;
	left: 10px;
	z-index: 999999;
	width: auto;
	height: auto;
	padding: 12px 18px;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--creemly-white);
	color: var(--creemly-dark);
	box-shadow: 0 0 0 2px var(--creemly-primary);
}

/* --------------------------------------------------------------
   5. Layout
-------------------------------------------------------------- */

.creemly-container {
	width: min(
		calc(100% - 40px),
		var(--creemly-container)
	);
	margin-right: auto;
	margin-left: auto;
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-content {
	flex: 1;
}

/* --------------------------------------------------------------
   7. Buttons
-------------------------------------------------------------- */

.button,
button.button,
input[type="submit"],
input[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 22px;
	border: 1px solid var(--creemly-primary);
	border-radius: var(--creemly-radius);
	background: var(--creemly-primary);
	color: var(--creemly-white);
	font-weight: 600;
	text-align: center;
	transition:
		background var(--creemly-transition),
		border-color var(--creemly-transition),
		color var(--creemly-transition);
}

.button:hover,
button.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	border-color: var(--creemly-primary-dark);
	background: var(--creemly-primary-dark);
	color: var(--creemly-white);
}

.button-secondary {
	border-color: var(--creemly-dark);
	background: transparent;
	color: var(--creemly-dark);
}

.button-secondary:hover {
	background: var(--creemly-dark);
	color: var(--creemly-white);
}

/* --------------------------------------------------------------
   8. Hero
-------------------------------------------------------------- */

.creemly-hero {
	padding: 100px 0;
	background: var(--creemly-secondary);
}

.hero-content {
	max-width: 800px;
}

.hero-content h1 {
	margin-bottom: 25px;
}

.hero-content p {
	max-width: 700px;
	font-size: 20px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 30px;
}

/* --------------------------------------------------------------
   9. Sections
-------------------------------------------------------------- */

.creemly-home-section {
	padding: 80px 0;
}

.section-header {
	margin-bottom: 40px;
	text-align: center;
}

.section-header h2 {
	margin-bottom: 15px;
}

.section-action {
	margin-top: 40px;
	text-align: center;
}

.vendor-section-content {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

/* --------------------------------------------------------------
   10. Breadcrumbs
-------------------------------------------------------------- */

.creemly-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 30px;
	color: var(--creemly-muted);
	font-size: 14px;
}

.creemly-breadcrumbs a:hover {
	color: var(--creemly-primary);
}

.breadcrumb-separator {
	color: var(--creemly-border);
}

/* --------------------------------------------------------------
   11. Page Headers
-------------------------------------------------------------- */

.page-header {
	margin-bottom: 40px;
}

.page-title {
	margin-bottom: 15px;
}

.archive-description {
	max-width: 800px;
	color: var(--creemly-muted);
}

/* --------------------------------------------------------------
   12. Blog / Posts
-------------------------------------------------------------- */

.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.post-card {
	overflow: hidden;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
	background: var(--creemly-white);
}

.post-card-image {
	display: block;
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform var(--creemly-transition);
}

.post-card:hover .post-card-image img {
	transform: scale(1.03);
}

.post-card-content {
	padding: 25px;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
	color: var(--creemly-muted);
	font-size: 14px;
}

.post-meta-author::before {
	content: "•";
	margin-right: 10px;
}

.post-card-title {
	margin-bottom: 15px;
	font-size: 28px;
}

.post-card-title a:hover {
	color: var(--creemly-primary);
}

.post-card-excerpt {
	margin-bottom: 20px;
	color: var(--creemly-muted);
}

.post-card-link {
	color: var(--creemly-primary);
	font-weight: 700;
}

.post-card-link:hover {
	color: var(--creemly-primary-dark);
}

/* --------------------------------------------------------------
   13. Single Post / Page Content
-------------------------------------------------------------- */

.entry-header {
	margin-bottom: 35px;
}

.entry-title {
	margin-bottom: 20px;
}

.entry-featured-image {
	margin-bottom: 40px;
}

.entry-featured-image img {
	width: 100%;
}

.entry-content {
	max-width: 900px;
}

.entry-content img {
	margin-top: 20px;
	margin-bottom: 20px;
}

.entry-footer {
	margin-top: 40px;
	padding-top: 25px;
	border-top: 1px solid var(--creemly-border);
}

.post-categories,
.post-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
}

.post-categories a,
.post-tags a {
	color: var(--creemly-primary);
}

.post-categories a:hover,
.post-tags a:hover {
	color: var(--creemly-primary-dark);
}

/* --------------------------------------------------------------
   14. Pagination
-------------------------------------------------------------- */

.pagination-wrapper {
	margin-top: 50px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
}

.nav-links .current,
.nav-links a:hover {
	border-color: var(--creemly-primary);
	background: var(--creemly-primary);
	color: var(--creemly-white);
}

/* --------------------------------------------------------------
   15. WooCommerce
-------------------------------------------------------------- */

.creemly-woocommerce-main {
	padding-top: 60px;
	padding-bottom: 60px;
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 30px;
	margin: 0;
	padding: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
}

.product-card {
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
	background: var(--creemly-white);
}

.product-card-image {
	position: relative;
}

.product-card-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 10px;
	border-radius: 50px;
	background: var(--creemly-primary);
	color: var(--creemly-white);
	font-size: 12px;
	font-weight: 700;
}

.product-card-content {
	padding: 20px;
}

.product-card-category {
	margin-bottom: 8px;
	color: var(--creemly-muted);
	font-size: 13px;
}

.product-card-category a:hover {
	color: var(--creemly-primary);
}

.product-card-title {
	margin-bottom: 12px;
	font-size: 24px;
}

.product-card-title a:hover {
	color: var(--creemly-primary);
}

.product-card-description {
	margin-bottom: 20px;
	color: var(--creemly-muted);
	font-size: 14px;
}

.product-card-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.product-card-price {
	color: var(--creemly-dark);
	font-weight: 700;
}

.product-card-price del {
	color: var(--creemly-muted);
	font-weight: 400;
}

.product-card-price ins {
	text-decoration: none;
}

.product-card-action .button {
	min-height: 40px;
	padding: 8px 14px;
	font-size: 14px;
}

/* --------------------------------------------------------------
   16. WooCommerce Shop Toolbar
-------------------------------------------------------------- */

.shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 30px;
}

.woocommerce .woocommerce-result-count {
	margin: 0;
}

.woocommerce .woocommerce-ordering {
	margin: 0;
}

.woocommerce .woocommerce-ordering select {
	min-height: 42px;
	padding: 8px 35px 8px 12px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
	background: var(--creemly-white);
}

/* --------------------------------------------------------------
   17. WooCommerce Single Product
-------------------------------------------------------------- */

.woocommerce div.product {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 60px;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
	float: none;
	width: auto;
}

.woocommerce div.product div.images img {
	border-radius: var(--creemly-radius);
}

.woocommerce div.product .product_title {
	margin-bottom: 15px;
	font-size: 42px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--creemly-primary);
	font-size: 28px;
	font-weight: 700;
}

.woocommerce div.product form.cart {
	margin-top: 25px;
}

.woocommerce div.product form.cart .quantity {
	margin-right: 10px;
}

.woocommerce .quantity .qty {
	width: 80px;
	min-height: 44px;
	padding: 8px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
}

.woocommerce div.product .product_meta {
	padding-top: 25px;
	border-top: 1px solid var(--creemly-border);
	color: var(--creemly-muted);
}

.woocommerce div.product .woocommerce-tabs {
	grid-column: 1 / -1;
	margin-top: 30px;
}

/* --------------------------------------------------------------
   18. WooCommerce Cart
-------------------------------------------------------------- */

.creemly-cart-page {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
	gap: 40px;
}

.cart-page-title,
.checkout-title {
	margin-bottom: 30px;
}

.woocommerce-cart-form table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-cart-form th,
.woocommerce-cart-form td {
	padding: 15px;
	border-bottom: 1px solid var(--creemly-border);
	text-align: left;
}

.woocommerce-cart-form .product-thumbnail img {
	width: 80px;
}

.woocommerce-cart-form .product-remove .remove {
	font-size: 24px;
	color: var(--creemly-danger);
}

.woocommerce-cart-form .actions {
	padding-top: 25px;
}

.woocommerce-cart-form .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

.woocommerce-cart-form .coupon label {
	width: 100%;
}

.woocommerce-cart-form .coupon input {
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
}

.cart_totals {
	padding: 25px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
}

.cart_totals h2 {
	font-size: 32px;
}

.cart_totals table {
	width: 100%;
}

/* --------------------------------------------------------------
   19. WooCommerce Checkout
-------------------------------------------------------------- */

.checkout-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
	gap: 40px;
}

.checkout-order-review {
	padding: 30px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
}

.checkout-section-title {
	font-size: 32px;
}

.woocommerce form .form-row {
	margin-bottom: 20px;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 7px;
	font-weight: 600;
}

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--creemly-border);
	border-radius: var(--creemly-radius);
	background: var(--creemly-white);
}

.woocommerce form textarea {
	min-height: 120px;
	resize: vertical;
}

.woocommerce-checkout-review-order-table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: 12px 0;
	border-bottom: 1px solid var(--creemly-border);
}

.woocommerce #payment {
	margin-top: 25px;
	background: var(--creemly-secondary);
	border-radius: var(--creemly-radius);
}

.woocommerce #payment ul.payment_methods {
	padding: 20px;
}

.woocommerce #payment div.form-row {
	padding: 20px;
}

/* --------------------------------------------------------------
   20. Notices
-------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin-bottom: 25px;
	padding: 15px 20px;
	border-radius: var(--creemly-radius);
}

.woocommerce-message {
	border-left: 4px solid var(--creemly-success);
	background: #f2fbf6;
}

.woocommerce-info {
	border-left: 4px solid var(--creemly-primary);
	background: #f1fbfa;
}

.woocommerce-error {
	border-left: 4px solid var(--creemly-danger);
	background: #fff5f5;
	list-style: none;
}

/* --------------------------------------------------------------
   21. Footer
-------------------------------------------------------------- */

.site-footer {
	margin-top: auto;
	padding: 60px 0 25px;
	background: var(--creemly-dark);
	color: var(--creemly-white);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
}

.site-footer h2,
.site-footer h3,
.site-footer h4 {
	color: var(--creemly-white);
}

.site-footer a:hover {
	color: var(--creemly-primary);
}

.footer-navigation-wrapper {
	margin-top: 40px;
	padding-top: 25px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-info {
	margin-top: 25px;
	padding-top: 25px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.copyright {
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------
   22. Responsive
-------------------------------------------------------------- */

@media (max-width: 1024px) {

	h1 {
		font-size: 54px;
	}

	h2 {
		font-size: 42px;
	}

	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.woocommerce div.product {
		grid-template-columns: 1fr;
	}

	.creemly-cart-page,
	.checkout-layout {
		grid-template-columns: 1fr;
	}

}

@media (max-width: 767px) {

	.creemly-container {
		width: min(
			calc(100% - 30px),
			var(--creemly-container)
		);
	}

	h1 {
		font-size: 44px;
	}

	h2 {
		font-size: 36px;
	}

	h3 {
		font-size: 28px;
	}

	h4 {
		font-size: 24px;
	}

	.posts-grid {
		grid-template-columns: 1fr;
	}

	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 15px;
	}

	.product-card-content {
		padding: 15px;
	}

	.product-card-title {
		font-size: 20px;
	}

	.product-card-bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.shop-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.woocommerce-cart-form {
		overflow-x: auto;
	}

	.footer-widgets {
		grid-template-columns: 1fr;
	}

}

@media (max-width: 480px) {

	h1 {
		font-size: 38px;
	}

	h2 {
		font-size: 32px;
	}

	.hero-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-actions .button {
		width: 100%;
	}

	.woocommerce ul.products {
		grid-template-columns: 1fr;
	}

	.product-card-bottom {
		flex-direction: row;
		align-items: center;
	}

}