/*
Theme Name: Rish Digitals
Theme URI: https://rishdigitals.com
Author: Rish Digitals
Author URI: https://rishdigitals.com
Description: An Etsy-style marketplace theme for selling digital HTML planners and downloadable products. Built on WooCommerce with a soft rose/pink aesthetic, product-grid storefront, gallery-driven listing pages, reviews, and instant digital delivery.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rish-digitals
Tags: e-commerce, woocommerce, two-columns, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready
WC requires at least: 7.0
WC tested up to: 9.4

© 2026 Rish Digitals. Personal use only. Do not resell, redistribute, or share.
*/

/* ==========================================================================
   Design Tokens — Rish Digitals
   ========================================================================== */
:root {
  /* Brand palette */
  --rd-rose:        #d6447a;
  --rd-rose-dark:   #b8336a;
  --rd-rose-soft:   #f7d8e4;
  --rd-rose-tint:   #fdeef4;
  --rd-plum:        #2e2433;   /* Etsy-style dark nav/hero */
  --rd-plum-soft:   #3d3144;
  --rd-cream:       #faf6f2;
  --rd-paper:       #ffffff;
  --rd-ink:         #2b2329;
  --rd-muted:       #6b6168;
  --rd-line:        #ece5ea;
  --rd-success:     #2e7d4f;
  --rd-star:        #f2b705;

  /* Type */
  --rd-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --rd-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Geometry */
  --rd-radius:    14px;
  --rd-radius-sm: 9px;
  --rd-radius-pill: 999px;
  --rd-shadow:    0 2px 14px rgba(46, 36, 51, 0.08);
  --rd-shadow-lg: 0 12px 38px rgba(46, 36, 51, 0.16);
  --rd-maxw:      1280px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--rd-sans);
  color: var(--rd-ink);
  background: var(--rd-cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--rd-serif); font-weight: 700; line-height: 1.15; color: var(--rd-ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

a { color: var(--rd-rose-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--rd-rose); }

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

.rd-container { max-width: var(--rd-maxw); margin: 0 auto; padding: 0 24px; }

.screen-reader-text {
  position: absolute !important; clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.rd-btn, button, input[type="submit"],
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--rd-sans); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.6rem; border-radius: var(--rd-radius-pill);
  background: var(--rd-plum); color: #fff; border: 1.5px solid var(--rd-plum);
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-align: center; line-height: 1;
}
.rd-btn:hover, button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: #000; color: #fff; transform: translateY(-1px); box-shadow: var(--rd-shadow);
}
.rd-btn--rose, .woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce input.button.alt, .woocommerce #respond input#submit.alt,
.woocommerce .single_add_to_cart_button {
  background: var(--rd-rose); border-color: var(--rd-rose);
}
.rd-btn--rose:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover {
  background: var(--rd-rose-dark); border-color: var(--rd-rose-dark); color: #fff;
}
.rd-btn--ghost {
  background: transparent; color: var(--rd-ink); border-color: var(--rd-line);
}
.rd-btn--ghost:hover { background: #fff; border-color: var(--rd-ink); color: var(--rd-ink); }

/* ==========================================================================
   Header
   ========================================================================== */
.rd-header { background: var(--rd-paper); border-bottom: 1px solid var(--rd-line); position: sticky; top: 0; z-index: 50; }
.rd-header__bar { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.rd-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.rd-brand__logo { height: 38px; width: auto; }
.rd-brand__name { font-family: var(--rd-serif); font-weight: 800; font-size: 1.5rem; color: var(--rd-rose); letter-spacing: -.5px; }
.rd-brand__name span { color: var(--rd-plum); }

.rd-search { flex: 1; position: relative; max-width: 720px; }
.rd-search input[type="search"] {
  width: 100%; padding: .85rem 3rem .85rem 1.2rem; font-size: 1rem;
  border: 2px solid var(--rd-ink); border-radius: var(--rd-radius-pill);
  background: #fff; color: var(--rd-ink);
}
.rd-search input[type="search"]:focus { outline: none; border-color: var(--rd-rose); }
.rd-search__btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0; border-radius: 50%; background: var(--rd-rose); border: none;
}
.rd-search__btn svg { width: 20px; height: 20px; }

.rd-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rd-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--rd-ink); background: transparent; border: none; cursor: pointer;
}
.rd-iconbtn:hover { background: var(--rd-rose-tint); color: var(--rd-rose-dark); }
.rd-iconbtn svg { width: 24px; height: 24px; }
.rd-cart-count {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--rd-rose); color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Primary nav (category strip) */
.rd-nav { border-top: 1px solid var(--rd-line); }
.rd-nav__inner { padding: 8px 0; }
.rd-nav__list,
.rd-nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.rd-nav__list li,
.rd-nav ul li { margin: 0; padding: 0; list-style: none; }
.rd-nav__list li::before { content: none !important; }
.rd-nav a {
  display: inline-block;
  color: var(--rd-ink);
  font-weight: 600;
  font-size: .92rem;
  padding: 6px 14px;
  border-radius: var(--rd-radius-pill);
  text-decoration: none;
  line-height: 1.4;
}
.rd-nav a:hover { background: var(--rd-rose-tint); color: var(--rd-rose-dark); }
.rd-nav .current-menu-item > a,
.rd-nav .current_page_item > a { background: var(--rd-plum); color: #fff; }

/* Mobile menu toggle */
.rd-menu-toggle { display: none; }

/* ==========================================================================
   Hero — two modes:
   .rd-hero--image  = uploaded banner, shown in full, no overlay
   .rd-hero--split  = default text+sketch banner
   ========================================================================== */
.rd-hero {
  border-radius: var(--rd-radius);
  overflow: hidden;
  margin: 24px 0 36px;
}

/* IMAGE-ONLY mode: full banner, natural aspect ratio, clickable */
.rd-hero--image { background: transparent; padding: 0; }
.rd-hero__banner { display: block; line-height: 0; }
.rd-hero__banner img {
  display: block;
  width: 100%;
  height: auto;          /* keep full aspect ratio, no cropping */
  max-width: 100%;
  object-fit: contain;   /* never crop the image */
}

/* SPLIT mode (default): text left, sketch right */
.rd-hero--split {
  background: var(--rd-plum);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 280px;
}
.rd-hero__text {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rd-hero__text h1 { color: #fff; margin: 0 0 .35em; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.rd-hero__text p { font-size: 1.05rem; color: #e6dde9; margin: 0 0 1.4rem; max-width: 40ch; }
.rd-hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); color: #fff;
  padding: .35rem .9rem; border-radius: var(--rd-radius-pill);
  font-size: .82rem; margin-bottom: 1.1rem; align-self: flex-start;
}
.rd-hero__cta { align-self: flex-start; }

.rd-hero__media {
  position: relative;
  min-height: 280px;
  background: linear-gradient(135deg, var(--rd-rose-soft) 0%, var(--rd-plum-soft) 100%);
  overflow: hidden;
}
.rd-hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
/* Decorative pattern when no custom image is uploaded */
.rd-hero__media--default::before,
.rd-hero__media--default::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,0) 60%);
}
.rd-hero__media--default::before { width: 380px; height: 380px; top: -80px; right: -60px; background: var(--rd-rose); opacity: .65; }
.rd-hero__media--default::after  { width: 260px; height: 260px; bottom: -60px; left: -40px; background: var(--rd-rose-soft); opacity: .85; }
.rd-hero__media--default .rd-hero__sketch {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.rd-hero__sketch svg { width: 70%; max-width: 320px; height: auto; opacity: .92; }

/* ==========================================================================
   Section headers
   ========================================================================== */
.rd-section { margin: 48px 0; }
.rd-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.rd-section__head h2 { margin: 0; }
.rd-section__head a { font-weight: 600; font-size: .95rem; white-space: nowrap; }

/* ==========================================================================
   Product grid (Etsy-style cards)
   ========================================================================== */
.rd-grid {
  display: grid; gap: 26px 18px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
ul.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
ul.products::before, ul.products::after { content: none !important; }

.rd-card, ul.products li.product {
  position: relative; background: transparent; margin: 0 !important; width: auto !important; float: none !important; text-align: left;
}
.rd-card__media, ul.products li.product a img {
  border-radius: var(--rd-radius); overflow: hidden; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; margin: 0 0 10px; box-shadow: var(--rd-shadow);
}
.rd-card__media { position: relative; aspect-ratio: 1/1; }
.rd-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rd-card:hover .rd-card__media img, ul.products li.product:hover a img { transform: scale(1.04); }

ul.products li.product a { color: var(--rd-ink); }
ul.products li.product .woocommerce-loop-product__title,
.rd-card__title {
  font-family: var(--rd-sans) !important; font-size: .95rem !important; font-weight: 500;
  line-height: 1.35; margin: 2px 0 4px !important; padding: 0 !important;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
ul.products li.product .price, .rd-card__price {
  color: var(--rd-ink) !important; font-weight: 700; font-size: 1rem;
}
ul.products li.product .price del { color: var(--rd-muted); font-weight: 400; font-size: .9rem; }
ul.products li.product .price ins { text-decoration: none; color: var(--rd-success) !important; }

.rd-card__seller { font-size: .82rem; color: var(--rd-muted); margin: 0 0 2px; }
.rd-card__rating { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--rd-muted); margin-top: 4px; }
.rd-card__rating .stars { color: var(--rd-star); letter-spacing: 1px; }

.rd-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--rd-rose); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: var(--rd-radius-pill); box-shadow: var(--rd-shadow);
}
.rd-badge--digital { background: var(--rd-plum); }
.rd-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--rd-shadow);
}
.rd-fav svg { width: 20px; height: 20px; color: var(--rd-ink); }
.rd-fav:hover svg { color: var(--rd-rose); }

.rd-card__instant { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--rd-muted); margin-top: 4px; }
.rd-card__instant svg { width: 14px; height: 14px; }

/* Add-to-cart on loop */
ul.products li.product .button.add_to_cart_button,
ul.products li.product .added_to_cart {
  font-size: .85rem; padding: .55rem 1.1rem; margin-top: 8px;
}

/* ==========================================================================
   Category pills row
   ========================================================================== */
.rd-cats { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.rd-cat { flex: 0 0 auto; text-align: center; width: 110px; }
.rd-cat__img { width: 110px; height: 110px; border-radius: var(--rd-radius); object-fit: cover; box-shadow: var(--rd-shadow); margin-bottom: 8px; }
.rd-cat__name { font-size: .85rem; font-weight: 600; color: var(--rd-ink); display: block; }

/* ==========================================================================
   Feature strip (trust badges)
   ========================================================================== */
.rd-trust { background: var(--rd-rose-tint); border-radius: var(--rd-radius); padding: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rd-trust__item { display: flex; gap: 12px; align-items: flex-start; }
.rd-trust__item svg { width: 30px; height: 30px; color: var(--rd-rose-dark); flex-shrink: 0; }
.rd-trust__item h4 { margin: 0 0 2px; font-family: var(--rd-sans); font-size: .98rem; }
.rd-trust__item p { margin: 0; font-size: .85rem; color: var(--rd-muted); }

/* ==========================================================================
   Single product (Etsy-style listing)
   ========================================================================== */
.woocommerce div.product { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px, .85fr); gap: 48px; margin-top: 28px; }
.woocommerce div.product .woocommerce-product-gallery { width: 100% !important; float: none; margin: 0; }
.woocommerce div.product .woocommerce-product-gallery__image img { border-radius: var(--rd-radius); }
.woocommerce div.product div.summary { width: 100% !important; float: none; margin: 0; }

.woocommerce div.product .product_title {
  font-family: var(--rd-serif); font-size: 1.7rem; line-height: 1.2; margin: 0 0 .4em;
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: var(--rd-ink); font-size: 1.7rem; font-weight: 800;
}
.woocommerce div.product p.price del { color: var(--rd-muted); font-weight: 400; font-size: 1.1rem; }
.woocommerce div.product p.price ins { text-decoration: none; }
.rd-sale-flag { display: inline-block; background: var(--rd-rose-soft); color: var(--rd-rose-dark); font-weight: 700; font-size: .82rem; padding: .25rem .7rem; border-radius: var(--rd-radius-pill); margin-left: .5rem; }

.woocommerce div.product form.cart { margin: 1.4rem 0; }
.woocommerce div.product form.cart .button { width: 100%; padding: 1rem; font-size: 1.05rem; }
.rd-buynow { width: 100%; margin-bottom: 10px; background: var(--rd-plum); }

.rd-meta-list { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 10px; }
.rd-meta-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.rd-meta-list svg { width: 20px; height: 20px; color: var(--rd-rose-dark); flex-shrink: 0; margin-top: 1px; }

.woocommerce-product-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem !important; }
.woocommerce .star-rating span::before, .woocommerce p.stars a::before { color: var(--rd-star); }

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 40px 0 0; border-bottom: 1px solid var(--rd-line); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--rd-line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent; border: none; border-radius: 0; padding: 0; margin: 0 18px 0 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-family: var(--rd-sans); font-weight: 600; color: var(--rd-muted); padding: 12px 2px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--rd-ink); border-bottom: 3px solid var(--rd-rose); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }

/* Reviews */
.woocommerce #reviews #comments ol.commentlist li .comment-text { border: 1px solid var(--rd-line); border-radius: var(--rd-radius); }

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.woocommerce .woocommerce-breadcrumb, .rd-breadcrumb {
  font-size: .85rem; color: var(--rd-muted); margin: 20px 0; }
.woocommerce .woocommerce-breadcrumb a, .rd-breadcrumb a { color: var(--rd-muted); }
.woocommerce .woocommerce-breadcrumb a:hover { color: var(--rd-rose-dark); }

/* ==========================================================================
   Cart / checkout polish
   ========================================================================== */
.woocommerce table.shop_table { border-radius: var(--rd-radius); border-color: var(--rd-line); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce .cart_totals { border-radius: var(--rd-radius); }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border-top-color: var(--rd-rose); border-radius: var(--rd-radius-sm); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--rd-rose); }

/* ==========================================================================
   Generic page / posts
   ========================================================================== */
.rd-page { background: #fff; border-radius: var(--rd-radius); padding: 40px clamp(20px, 5vw, 60px); box-shadow: var(--rd-shadow); margin: 28px 0; }
.rd-page .entry-content { max-width: 70ch; }
.rd-page .entry-content p { margin: 0 0 1.1em; }

/* ==========================================================================
   Footer
   ========================================================================== */
.rd-footer { background: var(--rd-plum); color: #e9e0ee; margin-top: 60px; }
.rd-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; padding: 56px 0 40px; }
.rd-footer h4 { color: #fff; font-family: var(--rd-sans); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.rd-footer a { color: #d9cbe0; font-size: .92rem; }
.rd-footer a:hover { color: #fff; }
.rd-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.rd-footer__brand .rd-brand__name { color: #fff; }
.rd-footer__brand p { color: #c5b6cd; font-size: .9rem; max-width: 34ch; }
.rd-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #b7a8bf; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .rd-hero--split { grid-template-columns: 1fr; min-height: 0; }
  .rd-hero__media { min-height: 220px; order: -1; }
  .rd-hero__text { padding: 36px 32px; }
  .woocommerce div.product { grid-template-columns: 1fr; gap: 28px; }
  .rd-trust { grid-template-columns: repeat(2, 1fr); }
  .rd-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .rd-header__bar { flex-wrap: wrap; }
  .rd-search { order: 3; flex-basis: 100%; max-width: none; }
  .rd-nav__inner { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
  .rd-menu-toggle { display: inline-flex; }
  .rd-grid, ul.products { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .rd-trust { grid-template-columns: 1fr; }
  .rd-footer__top { grid-template-columns: 1fr; gap: 24px; }
  .rd-hero__text { padding: 32px 22px; }
}
