/* COSA NOSTRA — Components (no gold, H&M style) */

/* Product card enhancements */
.cn-product-card { list-style: none; }
.cn-product-card__inner { position: relative; overflow: hidden; aspect-ratio: 3/4; background: var(--cn-off-white); }
.cn-product-card__img-wrap { display: block; width: 100%; height: 100%; overflow: hidden; position: relative; }
.cn-product-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; position: absolute; inset: 0; transition: transform 0.6s var(--ease); }
.cn-product-card__img-hover { opacity: 0; }
.cn-product-card:hover .cn-product-card__img-hover { opacity: 1; }
.cn-product-card:hover .cn-product-card__img-wrap img:first-child { transform: scale(1.04); }
.cn-product-card__badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
.cn-badge { padding: 3px 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.cn-badge--sale { background: var(--cn-red); color: var(--cn-white); }
.cn-badge--new { background: var(--cn-black); color: var(--cn-white); }
.cn-badge--bestseller { background: var(--cn-dark-gray); color: var(--cn-white); }
.cn-product-card__wishlist { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,0.9); border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.2s; color: var(--cn-black); }
.cn-product-card:hover .cn-product-card__wishlist, .cn-product-card__wishlist.is-wishlisted { opacity: 1; }
.cn-product-card__wishlist.is-wishlisted { color: var(--cn-red); }
.cn-product-card__quick-add { position: absolute; bottom: 0; left: 0; right: 0; transform: translateY(100%); transition: transform 0.3s var(--ease); z-index: 3; }
.cn-product-card:hover .cn-product-card__quick-add { transform: translateY(0); }
.cn-quick-add-btn { display: block; width: 100%; padding: 13px; background: var(--cn-black); color: var(--cn-white); border: none; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; text-align: center; text-decoration: none; transition: background 0.15s; }
.cn-quick-add-btn:hover { background: var(--cn-dark-gray); }
.cn-product-card__info { padding: 12px 4px 4px; background: var(--cn-white); }
.cn-product-card__name { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--cn-black); text-decoration: none; margin-bottom: 5px; line-height: 1.3; }
.cn-product-card__name:hover { text-decoration: underline; }
.cn-product-card__price-row { display: flex; align-items: baseline; gap: 8px; }
.cn-product-card__price { font-size: 0.875rem; font-weight: 700; color: var(--cn-black); }
.cn-product-card__price--sale { color: var(--cn-red); }
.cn-product-card__price--regular { font-size: 0.8125rem; color: var(--cn-mid-gray); text-decoration: line-through; font-weight: 400; }
.cn-product-card__colors { display: flex; gap: 4px; align-items: center; margin-top: 6px; }
.cn-product-card__color-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); cursor: pointer; }
.cn-products-grid { display: grid; gap: 2px; }
.cn-products-grid--4col { grid-template-columns: repeat(4,1fr); }
.cn-products-grid--3col { grid-template-columns: repeat(3,1fr); }
@media(max-width:900px) { .cn-products-grid--4col,.cn-products-grid--3col { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .cn-products-grid--4col,.cn-products-grid--3col { grid-template-columns: repeat(2,1fr); gap: 1px; } }

/* WooCommerce overrides */
.woocommerce-info { border-top-color: var(--cn-black) !important; }
.woocommerce-orders-table { width: 100%; border-collapse: collapse; }
.woocommerce-orders-table thead th { background: var(--cn-black); color: var(--cn-white); padding: 10px 14px; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; }
.woocommerce-orders-table tbody td { padding: 12px 14px; font-size: 0.875rem; border-bottom: 1px solid var(--cn-border); }
.woocommerce-orders-table .woocommerce-button { display: inline-block; padding: 6px 14px; background: var(--cn-black); color: var(--cn-white); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: background 0.15s; }
.woocommerce-orders-table .woocommerce-button:hover { background: var(--cn-dark-gray); }

/* cn-btn classes mapping (legacy compat) */
.cn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 24px; height: 44px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s; white-space: nowrap; }
.cn-btn--primary { background: var(--cn-black); color: var(--cn-white); border-color: var(--cn-black); }
.cn-btn--primary:hover { background: var(--cn-dark-gray); border-color: var(--cn-dark-gray); }
.cn-btn--outline { background: transparent; color: var(--cn-black); border-color: var(--cn-black); }
.cn-btn--outline:hover { background: var(--cn-black); color: var(--cn-white); }
.cn-btn--sm { height: 36px; padding: 0 16px; font-size: 0.75rem; }
.cn-btn--full { width: 100%; }

/* Toast */
.cn-toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.cn-toast { background: var(--cn-black); color: var(--cn-white); padding: 14px 20px; font-size: 0.875rem; pointer-events: all; transform: translateX(120%); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.35s; max-width: 320px; display: flex; align-items: center; gap: 10px; }
.cn-toast.is-visible { transform: translateX(0); opacity: 1; }
.cn-toast--error { border-left: 3px solid var(--cn-red); }
.cn-toast__close { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 1rem; margin-left: auto; padding: 0 4px; }

/* Sticky mobile ATC */
.cn-sticky-atc { position: fixed; bottom: 0; left: 0; right: 0; background: var(--cn-white); border-top: 1px solid var(--cn-border); padding: 12px 16px; display: flex; align-items: center; gap: 12px; z-index: 500; transform: translateY(100%); transition: transform 0.3s var(--ease); }
.cn-sticky-atc.is-visible { transform: translateY(0); }
.cn-sticky-atc__name { flex: 1; font-size: 0.8125rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
