/*
Theme Name: Hasan Theme
Theme URI: https://example.com/hasan-theme
Author: Mehedi
Author URI: https://example.com
Description: A WooCommerce compatible theme built with Tailwind CSS.
Version: 1.0.3
Text Domain: hasan-theme
*/

/* --- Base Resets --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

/* --- Cart Drawer Styles (Complex animations that need CSS) --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 100%;
  max-width: 420px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.cart-overlay.active .cart-drawer {
  transform: translateX(0);
}

/* Utility Classes */
.ht_hidden {
  display: none !important;
}

.ht_block {
  display: block !important;
}

/* WooCommerce Gallery Styling */
.woocommerce-product-gallery {
  position: relative;
}

.woocommerce-product-gallery .flex-viewport {
  border: 1px solid #f3f4f6;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.woocommerce-product-gallery__wrapper {
  margin: 0 !important;
  transition: all opacity 0.3s;
}

.woocommerce-product-gallery__wrapper a {
  display: flex;
}

.flex-control-nav.flex-control-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem !important;
  padding: 0 !important;
  list-style: none !important;
}

.flex-control-nav.flex-control-thumbs li {
  width: 80px !important;
  cursor: pointer;
}

.flex-control-nav.flex-control-thumbs img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
  aspect-ratio: 1/1;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 4px;
  transition: all 0.2s;
}

.flex-control-nav.flex-control-thumbs img.flex-active {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

/* Woocommerce form designs */
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select {
  outline: 0;
  margin-bottom: 0;
  border: 1px solid #d2d6dc;
  border-radius: 0.3rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: 40px;
  padding: 0 0.7em;
}

.woocommerce form .form-row textarea#order_comments {
  padding: 1rem;
  height: 150px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  outline: 0;
  margin-bottom: 0;
  border: 1px solid #d2d6dc;
  border-radius: 0.3rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: 35px;
  padding: 0 0.7em;
}

.select2-container .select2-dropdown,
.select2-container .select2-selection {
  border: 1px solid #d2d6dc;
}

.select2-container .select2-search--dropdown,
.select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0.6rem;
}

h3#ship-to-different-address {
  margin-top: 0px;
}

.woocommerce-privacy-policy-text {
  padding-top: 1rem;
  margin-bottom: 2rem;
}

.woocommerce-form-coupon-toggle .woocommerce-info {
  padding: 0;
  margin: 0 0 2em;
  background-color: transparent;
  border-top: none;
  list-style: none outside;
  width: auto;
  word-wrap: break-word;
}

.woocommerce-form-coupon-toggle .woocommerce-info::before {
  display: none;
}

.woocommerce-form-coupon-toggle .woocommerce-info a {
  text-decoration: underline;
  color: #000;
}

.ht_content-wrapper {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #1a1a1a;
}

/* Paragraphs */
.ht_content-wrapper p {
  margin-bottom: 1.4em;
}

/* Headings */
.ht_content-wrapper h1,
.ht_content-wrapper h2,
.ht_content-wrapper h3,
.ht_content-wrapper h4,
.ht_content-wrapper h5,
.ht_content-wrapper h6 {
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ht_content-wrapper h1 {
  font-size: 2rem;
}
.ht_content-wrapper h2 {
  font-size: 1.6rem;
}
.ht_content-wrapper h3 {
  font-size: 1.3rem;
}
.ht_content-wrapper h4 {
  font-size: 1.15rem;
}

/* Links */
.ht_content-wrapper a {
  color: #0f62fe;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.ht_content-wrapper a:hover {
  color: #0043ce;
}

/* Images */
.ht_content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.8em 0;
}

/* Lists */
.ht_content-wrapper ul,
.ht_content-wrapper ol {
  margin: 1.4em 0;
  padding-left: 1.4em;
}

.ht_content-wrapper li {
  margin-bottom: 0.6em;
}

/* Blockquotes */
.ht_content-wrapper blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1.2em;
  margin: 2em 0;
  font-style: italic;
  color: #555;
}

/* Code */
.ht_content-wrapper code {
  background: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.ht_content-wrapper pre {
  background: #111827;
  color: #f9fafb;
  padding: 1.2em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.8em 0;
  line-height: 1.5;
}

/* Horizontal rule */
.ht_content-wrapper hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 3em 0;
}
