/*
Theme Name: Selene Sarees
Theme URI: https://selene-dev.devascend.co.in
Author: Selene Sarees
Description: Lightweight custom WooCommerce storefront theme for Selene Sarees development.
Version: 0.2.0
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.3
Text Domain: selene
*/

/*
 * Component styles only. Tokens, base element styles, layout, buttons,
 * forms, and accessibility styles live in assets/css/design-system.css
 * (enqueued before this file). Consume tokens — never redefine them.
 */

/* Header (mobile-first: toggle | brand | actions; nav inlines at 1024px) */

.selene-header,
.selene-footer {
  background: var(--selene-surface);
  border-color: var(--selene-border);
  border-style: solid;
  border-width: 0 0 1px;
}

.selene-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.selene-header__inner {
  align-items: center;
  display: flex;
  gap: var(--selene-space-2);
  min-height: 60px;
}

.selene-footer__inner {
  align-items: center;
  display: flex;
  gap: var(--selene-space-5);
  justify-content: space-between;
  min-height: 72px;
}

.selene-brand {
  color: var(--selene-primary);
  font-family: var(--selene-heading-font);
  font-size: var(--selene-text-lg);
  font-weight: var(--selene-weight-bold);
  margin-right: auto;
  text-decoration: none;
  white-space: nowrap;
}

.selene-nav ul {
  display: flex;
  gap: var(--selene-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.selene-nav--desktop {
  display: none;
}

.selene-nav--desktop a {
  border-radius: var(--selene-radius-sm);
  color: var(--selene-text);
  display: inline-flex;
  font-size: var(--selene-text-sm);
  font-weight: var(--selene-weight-medium);
  letter-spacing: 0.02em;
  min-height: 44px;
  padding: var(--selene-space-3) var(--selene-space-2);
  text-decoration: none;
  text-transform: uppercase;
}

.selene-nav--desktop a:hover,
.selene-nav--desktop .current-menu-item a {
  color: var(--selene-primary);
}

.selene-header__actions {
  align-items: center;
  display: flex;
  gap: var(--selene-space-1);
}

.selene-icon-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--selene-radius-sm);
  color: var(--selene-ink);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: var(--selene-space-2);
  position: relative;
  text-decoration: none;
  transition: color var(--selene-transition);
}

.selene-icon-btn:hover {
  background: transparent;
  border: 0;
  color: var(--selene-primary);
}

.selene-icon-btn:disabled {
  color: var(--selene-muted);
  cursor: default;
  opacity: 0.55;
}

.selene-cart-count {
  align-items: center;
  background: var(--selene-primary);
  border-radius: var(--selene-radius-pill);
  color: #ffffff;
  display: inline-flex;
  font-family: var(--selene-body-font);
  font-size: var(--selene-text-xs);
  font-weight: var(--selene-weight-bold);
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 3px 5px;
  position: absolute;
  right: 2px;
  top: 4px;
}

.selene-cart-count[aria-hidden="true"] {
  display: none;
}

/* Mobile drawer */

.selene-menu-toggle .selene-icon--close {
  display: none;
}

.selene-menu-toggle[aria-expanded="true"] .selene-icon--menu {
  display: none;
}

.selene-menu-toggle[aria-expanded="true"] .selene-icon--close {
  display: block;
}

.selene-drawer-overlay {
  background: rgba(28, 28, 28, 0.5);
  inset: 0;
  position: fixed;
  z-index: 50;
}

.selene-drawer {
  background: var(--selene-surface);
  bottom: 0;
  box-shadow: var(--selene-shadow-md);
  display: flex;
  flex-direction: column;
  left: 0;
  max-width: 85vw;
  overflow-y: auto;
  padding: var(--selene-space-5) var(--selene-space-4);
  position: fixed;
  top: 0;
  width: 320px;
  z-index: 60;
}

.selene-nav--drawer ul {
  flex-direction: column;
  gap: 0;
}

.selene-nav--drawer a {
  border-bottom: 1px solid var(--selene-border);
  color: var(--selene-ink);
  display: flex;
  font-family: var(--selene-heading-font);
  font-size: var(--selene-text-md);
  min-height: 48px;
  padding: var(--selene-space-3) var(--selene-space-1);
  text-decoration: none;
}

.selene-nav--drawer a:hover,
.selene-nav--drawer .current-menu-item a {
  color: var(--selene-primary);
}

.selene-drawer__footer {
  border-top: 1px solid var(--selene-border);
  margin-top: auto;
  padding-top: var(--selene-space-4);
}

.selene-drawer__footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

body.selene-menu-open {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .selene-menu-toggle {
    display: none;
  }

  .selene-nav--desktop {
    display: block;
  }

  .selene-header__inner {
    gap: var(--selene-space-5);
    min-height: 72px;
  }

  .selene-brand {
    margin-right: 0;
  }

  .selene-nav--desktop {
    margin-right: auto;
  }
}

.selene-main {
  min-height: 60vh;
}

.selene-hero {
  align-items: center;
  display: grid;
  min-height: 420px;
  padding: var(--selene-space-8) 0;
}

.selene-hero h1 {
  margin: 0 0 var(--selene-space-4);
}

.selene-hero p {
  color: var(--selene-muted);
  font-size: var(--selene-text-md);
  margin: 0 0 var(--selene-space-2);
}

.selene-status {
  color: var(--selene-primary);
  font-weight: var(--selene-weight-bold);
}

.selene-content {
  padding: var(--selene-space-7) 0;
}

.selene-footer {
  border-width: 1px 0 0;
  color: var(--selene-muted);
}

/* Product card */

.selene-card-grid {
  display: grid;
  gap: var(--selene-space-5) var(--selene-space-4);
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
}

.selene-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.selene-card__media {
  aspect-ratio: 3 / 4;
  background: var(--selene-surface-subtle);
  border-radius: var(--selene-radius-md);
  overflow: hidden;
  position: relative;
}

.selene-card__media-link {
  display: block;
  height: 100%;
}

.selene-card__media img {
  height: 100%;
  object-fit: cover;
  transition: transform var(--selene-transition);
  width: 100%;
}

.selene-card:hover .selene-card__media img {
  transform: scale(1.03);
}

.selene-card__badge {
  border-radius: var(--selene-radius-sm);
  font-size: var(--selene-text-xs);
  font-weight: var(--selene-weight-bold);
  left: var(--selene-space-2);
  letter-spacing: 0.04em;
  padding: var(--selene-space-1) var(--selene-space-2);
  position: absolute;
  text-transform: uppercase;
  top: var(--selene-space-2);
  z-index: 1;
}

.selene-card__badge--sale {
  background: var(--selene-primary);
  color: #ffffff;
}

.selene-card__badge--stock {
  background: var(--selene-ink);
  color: #ffffff;
}

.selene-card__wishlist {
  background: var(--selene-surface);
  border-radius: var(--selene-radius-pill);
  box-shadow: var(--selene-shadow-sm);
  min-height: 36px;
  min-width: 36px;
  position: absolute;
  right: var(--selene-space-2);
  top: var(--selene-space-2);
  z-index: 1;
}

.selene-card__wishlist:hover {
  background: var(--selene-surface);
}

.selene-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--selene-space-1);
  padding: var(--selene-space-3) var(--selene-space-1) 0;
}

.selene-card__title {
  font-size: var(--selene-text-base);
  line-height: var(--selene-leading-snug);
  margin: 0;
}

.selene-card__title a {
  color: var(--selene-ink);
  text-decoration: none;
}

.selene-card__title a:hover {
  color: var(--selene-primary);
}

.selene-card__price {
  font-size: var(--selene-text-sm);
  font-weight: var(--selene-weight-medium);
}

.selene-card__price del {
  color: var(--selene-muted);
  font-weight: var(--selene-weight-normal);
  margin-right: var(--selene-space-1);
}

.selene-card__price ins {
  color: var(--selene-primary);
  text-decoration: none;
}

.selene-card__actions {
  margin-top: auto;
  padding-top: var(--selene-space-2);
}

.selene-card__actions .button {
  font-size: var(--selene-text-sm);
  width: 100%;
}

.selene-card__actions .added_to_cart {
  display: inline-flex;
  font-size: var(--selene-text-sm);
  font-weight: var(--selene-weight-medium);
  margin-top: var(--selene-space-2);
  min-height: 44px;
  align-items: center;
}

@media (min-width: 768px) {
  .selene-card-grid {
    gap: var(--selene-space-6) var(--selene-space-5);
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .selene-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .selene-footer__inner,
  .selene-footer .selene-nav ul {
    align-items: flex-start;
    flex-direction: column;
  }

  .selene-footer__inner {
    padding: var(--selene-space-4) 0;
  }
}
