/* Tania Milner - Custom Gallery & Gelato Print on Demand Styles */

:root {
  --tm-gold: #c99e58;
  --tm-dark: #121417;
  --tm-light-bg: #fbfbfb;
  --tm-mat-bg: #ffffff;
  --tm-frame-color: #1a1a1a;
  --tm-border-radius: 12px;
  --tm-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tm-font-serif: 'Outfit', 'Playfair Display', Georgia, serif;
}

/* Base resets & typography for gallery */
.tm-gallery-section {
  padding: 60px 20px 80px 20px;
  background-color: var(--tm-light-bg);
  color: var(--tm-dark);
  font-family: var(--tm-font-sans);
}

.tm-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Gelato Print on Demand Feature Card */
.tm-gelato-banner {
  background: linear-gradient(135deg, #181c24 0%, #252d3a 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 40px 30px;
  margin-bottom: 50px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  align-items: center;
}

@media (max-width: 900px) {
  .tm-gelato-banner {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

.tm-gelato-content h3 {
  font-family: var(--tm-font-serif);
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 12px;
  color: #fff;
}

.tm-gelato-content p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.tm-gelato-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tm-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tm-pricing-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.tm-pricing-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.tm-pricing-size {
  font-size: 13px;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}

.tm-pricing-cost {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

/* Gallery Header & Controls */
.tm-gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.tm-gallery-header h2 {
  font-family: var(--tm-font-serif);
  font-size: 38px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #0f172a;
}

.tm-gallery-header p {
  font-size: 17px;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
}

.tm-gallery-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.tm-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-filter-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tm-filter-btn:hover,
.tm-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.tm-search-box {
  position: relative;
  min-width: 240px;
}

.tm-search-input {
  width: 100%;
  padding: 8px 16px 8px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.tm-search-input:focus {
  border-color: #0f172a;
}

.tm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

/* Artwork Grid & Museum Framing */
.tm-artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

@media (min-width: 1200px) {
  .tm-artwork-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tm-artwork-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.tm-artwork-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

/* Signature Museum Mat Border (larger at bottom) */
.tm-frame-container {
  padding: 16px 16px 28px 16px; /* Mat border with larger bottom margin */
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px #e5e7eb, 0 2px 4px rgba(0,0,0,0.04);
}

.tm-frame-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}

.tm-artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.tm-artwork-card:hover .tm-artwork-img {
  transform: scale(1.04);
}

.tm-artwork-info {
  padding: 18px 20px;
  border-top: 1px solid #f1f5f9;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tm-artwork-title {
  font-family: var(--tm-font-serif);
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.tm-artwork-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
}

.tm-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-price-tag {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.tm-price-tag span {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}

.tm-order-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tm-order-btn:hover {
  background: #334155;
}

/* Load More Button */
.tm-load-more-wrap {
  text-align: center;
  margin-top: 45px;
}

.tm-load-more-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 12px 36px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tm-load-more-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Lightbox & Gelato Order Modal */
.tm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

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

.tm-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 920px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  margin: auto;
  animation: tmModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tmModalPop {
  0% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@media (max-width: 820px) {
  .tm-modal-box {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
  }
}

.tm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  z-index: 20;
  transition: background 0.2s ease;
}

.tm-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tm-modal-preview {
  background: #f8fafc;
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #f1f5f9;
}

/* Framed preview with museum mat and glass reflection */
.tm-modal-framed-art {
  background: #ffffff;
  padding: 16px 16px 30px 16px; /* Proportionate bottom mat */
  border: 9px solid #1a1a1a;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16), inset 0 0 10px rgba(0,0,0,0.05);
  max-width: 100%;
}

.tm-modal-img {
  max-width: 100%;
  max-height: min(320px, 45vh);
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

.tm-modal-details {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  max-height: calc(100vh - 40px);
}

.tm-modal-details h3 {
  font-family: var(--tm-font-serif);
  font-size: 22px;
  margin: 0 0 4px 0;
  color: #0f172a;
}

.tm-modal-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

.tm-select-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 6px;
  display: block;
}

.tm-size-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.tm-size-option {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.tm-size-option:hover {
  border-color: #94a3b8;
}

.tm-size-option.selected {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 0 0 1px #0f172a;
}

.tm-size-name {
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
}

.tm-size-price {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 1px;
}

.tm-modal-cta-box {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
}

.tm-modal-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.tm-add-cart-btn,
.tm-buy-now-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
}

.tm-add-cart-btn {
  background: #0f172a;
  color: #ffffff;
}

.tm-add-cart-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.tm-buy-now-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #0f172a;
}

.tm-buy-now-btn:hover {
  background: #0f172a;
  color: #ffffff;
  transform: translateY(-1px);
}

.tm-inquire-link-wrap {
  text-align: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.tm-inquire-link {
  font-size: 12px;
  color: #64748b;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.tm-inquire-link:hover {
  color: #0f172a;
}

.tm-guarantee-note {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* Floating Cart Toast Notification */
.tm-cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 100000;
  transform: translateY(120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.tm-cart-toast.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.tm-toast-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tm-toast-content h5 {
  margin: 0 0 2px 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.tm-toast-content p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.tm-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.tm-toast-checkout-btn {
  background: #ffffff;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.tm-toast-checkout-btn:hover {
  background: #f1f5f9;
}

.tm-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.tm-toast-close:hover {
  color: #ffffff;
}

/* Artist Statement Section Styling */
.tm-statement-section {
  padding: 80px 20px;
  background: #ffffff;
}

.tm-statement-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 900px) {
  .tm-statement-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.tm-portrait-wrap {
  text-align: center;
}

.tm-portrait-img {
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 4px solid #ffffff;
}

.tm-quote-card {
  background: #f8fafc;
  border-left: 4px solid #0f172a;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  font-style: italic;
  color: #334155;
  line-height: 1.7;
}

/* WooCommerce shop, cart, checkout, product pages */
body.woocommerce-page,
body.woocommerce,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.single-product,
body.post-type-archive-product {
  background: #ffffff !important;
  color: #0f172a;
}

body.woocommerce-page .wp-site-blocks,
body.woocommerce .wp-site-blocks,
body.single-product .wp-site-blocks,
body.post-type-archive-product .wp-site-blocks {
  background: #ffffff;
  color: #0f172a;
}

.tm-wc-main,
.tm-wc-main h1,
.tm-wc-main h2,
.tm-wc-main h3,
.woocommerce-page .hostinger-ai-page-title,
.woocommerce-page .wp-block-post-title {
  color: #0f172a;
}

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-page .woocommerce {
  color: #0f172a;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page .wc-block-components-button {
  border-radius: 24px;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce-page .wc-block-cart__submit-button,
.woocommerce-page .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
  background: #0f172a !important;
  color: #ffffff !important;
  border-radius: 24px;
}

header.site-header,
.site-header-wrap {
  background: #ffffff !important;
}

.site-header-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .site-header-wrap .wp-block-group.alignwide {
    flex-wrap: wrap !important;
    gap: 12px;
  }
}
