/*
Theme Name: Kiosko NeoShop
Theme URI: https://wordpress.com/theme/kiosko/
Author: Automattic
Author URI: https://automattic.com/
Description: Kiosko NeoShop is a modern e-commerce theme for WooCommerce with Persian/Farsi RTL support, Vazirmatn font, and contemporary design inspired by modern online stores.
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 5.7
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: 
Text Domain: kiosko
Tags: e-commerce, four-columns, wide-blocks, block-patterns, block-styles, featured-images, full-site-editing, rtl-language-support, sticky-post, template-editing, threaded-comments, translation-ready, persian, farsi, vazirmatn, modern, neoshop, responsive
*/

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-color: var(--wp--preset--color--primary);
	text-decoration-thickness: 0.5px !important;
	text-underline-offset: 0.05em;
}

/* Reset browser default margins for blockquote element */
.wp-block-pullquote blockquote {
	margin: 0;
}

/* Search button inside style */
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	padding: 4px;
}

/* Adjust font size for comment reply title */
.wp-block-post-comments-form .comment-reply-title {
	font-size: var(--wp--preset--font-size--large);
}

/* Remove the bottom margin from the button */
.wp-block-post-comments-form .form-submit {
	margin-bottom: 0;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
}

/* Adjust the top padding for the submenu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	padding-top: var(--wp--preset--spacing--30);
}

/* Override the Gutenberg style to theme style */
.wp-block-post-author__byline,
.wp-block-post-author__bio {
	font-size: inherit;
}

/* Round the avatar and reset the vertical alignment */
.wp-block-post-author__avatar img {
	border-radius: 999px;
	line-height: 0;
}

/* Style tag cloud outline style  */
.wp-block-tag-cloud.is-style-outline a {
	border-color: var(--wp--preset--color--tertiary);
	border-radius: 999px;
	padding: 0 0.5rem;
}

.wp-block-tag-cloud.is-style-outline a:hover {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary);
}

/* Remove the default margin from author bio */
.wp-block-post-author__bio {
	margin: 0;
}

/* Remove the default margin from term description. */
.wp-block-term-description p:first-child {
	margin-top: 0;
}

.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Normalise font sizes for the latest comments and latest posts widgets */
.wp-block-latest-comments__comment-excerpt p,
.wp-block-latest-comments__comment-date,
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
	font-size: inherit;
}

/* Adjust font colour in the Calendar widget */
.wp-block-calendar table:where(:not(.has-text-color)) {
	color: var(--wp--preset--color--foreground);
}

/* Fix border radius setting for the avatar block */
.wp-block-avatar a,
.wp-block-avatar img {
	border-radius: inherit;
	vertical-align: middle;
}

/* Fix line height for various fields */
.wp-block-search__input,
.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]),
.wp-block-post-comments-form .comment-form textarea {
	line-height: inherit;
}

/* Style  border colour for search and Jetpack subscription blocks */
.wp-block-search__input,
.wp-block-search__button-inside .wp-block-search__inside-wrapper,
.wp-block-jetpack-subscriptions.wp-block-jetpack-subscriptions__supports-newline form input[type="email"] {
	border-color: var(--wp--preset--color--tertiary);
}

/* Needed to style input field for various Jetpack blocks */
.wp-block-jetpack-contact-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea,
.wp-block-jetpack-mailchimp input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-revue input:not([type="submit"]):not([type="checkbox"]) {
	background-color: #fff;
	border: 1px solid var(--wp--preset--color--tertiary);
	font-size: inherit;
	line-height: inherit;
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form label {
	font-weight: 400;
}

.wp-block-jetpack-contact-form.contact-form label span {
	opacity: 0.7;
}

.wp-block-jetpack-contact-form.contact-form select {
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form textarea {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Style the feedback you get after submitting the contact form */
div[id^="contact-form-"] h4 {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: inherit;
	line-height: 1.555555556;
}

div[id^="contact-form-"] .contact-form-submission {
	margin: 0;
	padding: 0;
}

/* Adjust vertical margins in the mailchimp block */
.wp-block-jetpack-mailchimp .wp-block-jetpack-button,
.wp-block-jetpack-mailchimp p {
	margin: var(--wp--preset--spacing--40) 0;
}

/* Adjust the size of the consent text in mailchimp block */
#wp-block-jetpack-mailchimp_consent-text {
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0;
}

/* Remove underline from the price after discounted */
ins {
	text-decoration: none;
}

/* Fix the hardcoded wide width value in the stylesheet for TT3 */
.woocommerce.woocommerce-page main {
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--style--root--padding-right) + var(--wp--style--root--padding-left));
}

/* RTL and Persian Support */
/* Set Vazirmatn font for Persian/Arabic languages */
html[lang^="fa"], html[lang^="ar"] {
	font-family: Vazirmatn, Vazir, Tahoma, Arial, sans-serif;
}

/* RTL Direction Support for Persian/Arabic */
html[lang^="fa"], html[lang^="ar"] {
	direction: rtl;
}

body[dir="rtl"], body.rtl {
	direction: rtl;
	font-family: Vazirmatn, Vazir, Tahoma, Arial, sans-serif;
}

/* Fix navigation alignment for RTL */
[dir="rtl"] .wp-block-navigation,
html[lang^="fa"] .wp-block-navigation,
html[lang^="ar"] .wp-block-navigation {
	text-align: right;
}

[dir="rtl"] .wp-block-navigation__responsive-container.is-menu-open {
	padding-right: var(--wp--preset--spacing--50);
	padding-left: var(--wp--preset--spacing--50);
}

/* Fix list padding for RTL */
[dir="rtl"] .wp-block-list,
html[lang^="fa"] .wp-block-list,
html[lang^="ar"] .wp-block-list {
	padding-right: var(--wp--preset--spacing--50);
	padding-left: 0;
}

/* Fix pullquote borders for RTL */
[dir="rtl"] .wp-block-quote,
html[lang^="fa"] .wp-block-quote,
html[lang^="ar"] .wp-block-quote {
	border-right: 1px solid var(--wp--preset--color--tertiary);
	border-left: none;
	padding-right: var(--wp--preset--spacing--50);
	padding-left: 0;
}

/* Fix alignment classes for RTL */
[dir="rtl"] .alignleft,
html[lang^="fa"] .alignleft,
html[lang^="ar"] .alignleft {
	float: right;
	margin-inline-start: 2em;
	margin-inline-end: 0;
}

[dir="rtl"] .alignright,
html[lang^="fa"] .alignright,
html[lang^="ar"] .alignright {
	float: left;
	margin-inline-start: 0;
	margin-inline-end: 2em;
}

/* Fix WooCommerce elements for RTL */
[dir="rtl"] .woocommerce .woocommerce-ordering,
[dir="rtl"] .woocommerce .woocommerce-result-count,
html[lang^="fa"] .woocommerce .woocommerce-ordering,
html[lang^="fa"] .woocommerce .woocommerce-result-count {
	text-align: right;
}

/* Ensure Persian/Arabic numerals display correctly */
html[lang^="fa"] .wp-block-post-date,
html[lang^="fa"] .wp-block-latest-posts__post-date,
html[lang^="fa"] time,
html[lang^="ar"] .wp-block-post-date,
html[lang^="ar"] .wp-block-latest-posts__post-date,
html[lang^="ar"] time {
	direction: ltr;
	unicode-bidi: embed;
}

/* Fix form elements for RTL */
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="password"],
[dir="rtl"] input[type="search"],
[dir="rtl"] textarea,
html[lang^="fa"] input[type="text"],
html[lang^="fa"] input[type="email"],
html[lang^="fa"] input[type="password"],
html[lang^="fa"] input[type="search"],
html[lang^="fa"] textarea {
	text-align: right;
	direction: rtl;
}

/* Fix search block for RTL */
[dir="rtl"] .wp-block-search__input,
html[lang^="fa"] .wp-block-search__input,
html[lang^="ar"] .wp-block-search__input {
	text-align: right;
	direction: rtl;
}

/* Persian/Arabic text styling */
html[lang^="fa"] h1, html[lang^="fa"] h2, html[lang^="fa"] h3, 
html[lang^="fa"] h4, html[lang^="fa"] h5, html[lang^="fa"] h6,
html[lang^="fa"] p, html[lang^="fa"] li, html[lang^="fa"] span,
html[lang^="ar"] h1, html[lang^="ar"] h2, html[lang^="ar"] h3, 
html[lang^="ar"] h4, html[lang^="ar"] h5, html[lang^="ar"] h6,
html[lang^="ar"] p, html[lang^="ar"] li, html[lang^="ar"] span {
	font-family: Vazirmatn, Vazir, Tahoma, Arial, sans-serif;
}

/* ========================================
   NeoShop Style Implementation
   ======================================== */

/* Modern Header Styling */
.site-header {
	background: #ffffff;
	border-bottom: 1px solid #ecf0f1;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	position: sticky;
	top: 0;
	z-index: 999;
}

.wp-block-site-title a {
	color: #2c3e50;
	font-weight: 700;
	font-size: 1.8rem;
	text-decoration: none;
}

.wp-block-site-title a:hover {
	color: #3498db;
}

/* Modern Navigation */
.wp-block-navigation {
	background: transparent;
}

.wp-block-navigation-item a {
	color: #2c3e50;
	font-weight: 500;
	padding: 0.5rem 1rem;
	border-radius: 5px;
	transition: all 0.3s ease;
}

.wp-block-navigation-item a:hover {
	background: #3498db;
	color: #ffffff;
	text-decoration: none;
}

/* Modern Button Styling */
.wp-block-button__link,
.wp-element-button {
	background: #3498db;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: #3498db;
	border: 2px solid #3498db;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #3498db;
	color: #ffffff;
}

/* Product Cards Modern Style */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: #ffffff;
	border: 1px solid #ecf0f1;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
	border-radius: 0;
	transition: all 0.3s ease;
}

.woocommerce ul.products li.product:hover img,
.woocommerce-page ul.products li.product:hover img {
	transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
	color: #2c3e50;
	font-weight: 600;
	font-size: 1.1rem;
	margin: 10px 0;
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
	color: #e74c3c;
	font-weight: 700;
	font-size: 1.2rem;
}

/* Modern Search Box */
.wp-block-search {
	position: relative;
}

.wp-block-search__input {
	border: 2px solid #ecf0f1;
	border-radius: 25px;
	padding: 12px 20px;
	font-size: 14px;
	transition: all 0.3s ease;
	background: #f8f9fa;
}

.wp-block-search__input:focus {
	border-color: #3498db;
	background: #ffffff;
	box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.wp-block-search__button {
	background: #3498db;
	border: none;
	border-radius: 20px;
	color: #ffffff;
	padding: 8px 16px;
	margin-right: 5px;
}

/* Modern Footer */
.site-footer {
	background: #2c3e50;
	color: #ecf0f1;
	padding: 40px 0 20px;
}

.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6 {
	color: #ffffff;
}

.site-footer a {
	color: #3498db;
	text-decoration: none;
}

.site-footer a:hover {
	color: #ffffff;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
	color: #2c3e50;
	font-weight: 600;
}

p {
	color: #34495e;
	line-height: 1.7;
}

/* Modern Spacing */
.wp-block-group {
	margin: 2rem 0;
}

.wp-block-cover {
	border-radius: 12px;
	overflow: hidden;
}

/* Cart and Checkout Styling */
.woocommerce table.shop_table {
	border: 1px solid #ecf0f1;
	border-radius: 8px;
	overflow: hidden;
}

.woocommerce table.shop_table th {
	background: #f8f9fa;
	color: #2c3e50;
	font-weight: 600;
}

.woocommerce .cart-collaterals .cart_totals {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 20px;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
	.wp-block-site-title a {
		font-size: 1.4rem;
	}
	
	.wp-block-navigation-item a {
		padding: 0.3rem 0.5rem;
		font-size: 0.9rem;
	}
	
	.woocommerce ul.products li.product {
		margin-bottom: 20px;
	}
}
