/* Pantutienda public storefront — soft kawaii style with pink accent */

:root {
    --pt-pink: #ff7bac;
    --pt-pink-dark: #e75c93;
    --pt-pink-soft: #ffe3ef;
    --pt-cream: #fff8fb;
    --pt-ink: #4a3b44;
    --pt-muted: #9b8a93;
    --pt-radius: 16px;
}

* {
    box-sizing: border-box;
}

body.pt-public {
    margin: 0;
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: var(--pt-cream);
    color: var(--pt-ink);
}

/* Header */
.pt-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffffee;
    backdrop-filter: blur(6px);
    border-bottom: 2px solid var(--pt-pink-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}

.pt-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--pt-pink-dark);
    text-decoration: none;
}

.pt-brand img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.pt-brand .cat-icon {
    display: block;
    width: 32px;
    height: 32px;
    fill: var(--pt-pink);
    stroke: none;
}

.pt-cart-button {
    position: relative;
    border: none;
    background: var(--pt-pink);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}

.pt-cart-button:hover {
    background: var(--pt-pink-dark);
}

.pt-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--pt-ink);
    color: #fff;
    font-size: 0.7rem;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Hero */
.pt-hero {
    text-align: center;
    padding: 36px 16px 24px;
    background: linear-gradient(180deg, var(--pt-pink-soft) 0%, var(--pt-cream) 100%);
}

.pt-hero h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pt-pink-dark);
}

.pt-hero p {
    margin: 0;
    color: var(--pt-muted);
    font-weight: 600;
}

/* Category filters */
.pt-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px;
    scrollbar-width: none;
}

.pt-filters::-webkit-scrollbar {
    display: none;
}

.pt-filter-chip {
    flex: 0 0 auto;
    border: 2px solid var(--pt-pink-soft);
    background: #fff;
    color: var(--pt-ink);
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.pt-filter-chip.active,
.pt-filter-chip:hover {
    background: var(--pt-pink);
    border-color: var(--pt-pink);
    color: #fff;
}

/* Product grid: 2 per row on mobile, scaling up */
.pt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pt-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

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

.pt-card {
    background: #fff;
    border: 2px solid var(--pt-pink-soft);
    border-radius: var(--pt-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 92, 147, 0.18);
}

.pt-card-image {
    aspect-ratio: 1;
    background: var(--pt-pink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-card-image .pt-placeholder {
    font-size: 2.2rem;
}

.pt-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.pt-card-category {
    align-self: flex-start;
    background: var(--pt-pink-soft);
    color: var(--pt-pink-dark);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
}

.pt-card-name {
    font-weight: 800;
    font-size: 0.95rem;
    margin: 0;
}

.pt-card-description {
    font-size: 0.78rem;
    color: var(--pt-muted);
    margin: 0;
    flex: 1;
}

.pt-card-price {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--pt-pink-dark);
}

.pt-add-button {
    margin-top: 6px;
    border: none;
    background: var(--pt-pink);
    color: #fff;
    border-radius: 10px;
    padding: 8px;
    font-weight: 800;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.pt-add-button:hover {
    background: var(--pt-pink-dark);
}

/* Cart sidebar */
.pt-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 59, 68, 0.4);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.pt-cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.pt-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    background: #fff;
    z-index: 1200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
}

.pt-cart-sidebar.open {
    transform: translateX(0);
}

.pt-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 2px solid var(--pt-pink-soft);
}

.pt-cart-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--pt-pink-dark);
}

.pt-close-button {
    border: none;
    background: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--pt-muted);
}

.pt-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pt-cart-empty {
    text-align: center;
    color: var(--pt-muted);
    font-weight: 600;
    margin-top: 32px;
}

.pt-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--pt-pink-soft);
    border-radius: 12px;
    padding: 8px 10px;
}

.pt-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pt-cart-item-name {
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.pt-cart-item-price {
    color: var(--pt-pink-dark);
    font-weight: 700;
    font-size: 0.8rem;
}

.pt-quantity-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pt-quantity-controls button {
    border: none;
    background: var(--pt-pink-soft);
    color: var(--pt-pink-dark);
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.pt-remove-button {
    border: none;
    background: none;
    color: var(--pt-muted);
    cursor: pointer;
    font-size: 1rem;
}

.pt-cart-footer {
    border-top: 2px solid var(--pt-pink-soft);
    padding: 16px;
}

.pt-cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.pt-checkout-button {
    width: 100%;
    border: none;
    background: var(--pt-pink);
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    font-weight: 800;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.pt-checkout-button:hover {
    background: var(--pt-pink-dark);
}

.pt-checkout-button:disabled {
    background: var(--pt-muted);
    cursor: not-allowed;
}

/* Checkout modal */
.pt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(74, 59, 68, 0.5);
    z-index: 1300;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 600px) {
    .pt-modal-overlay {
        align-items: center;
    }
}

.pt-modal-overlay.open {
    display: flex;
}

.pt-modal {
    background: #fff;
    border-radius: var(--pt-radius) var(--pt-radius) 0 0;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px;
}

@media (min-width: 600px) {
    .pt-modal {
        border-radius: var(--pt-radius);
    }
}

.pt-modal h2 {
    margin: 0 0 4px;
    color: var(--pt-pink-dark);
    font-size: 1.2rem;
}

.pt-form-group {
    margin-bottom: 12px;
}

.pt-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.pt-form-group small {
    display: block;
    color: var(--pt-muted);
    font-size: 0.72rem;
    margin-top: 2px;
}

.pt-form-group input,
.pt-form-group textarea {
    width: 100%;
    border: 2px solid var(--pt-pink-soft);
    border-radius: 10px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 0.9rem;
}

.pt-form-group input:focus,
.pt-form-group textarea:focus {
    outline: none;
    border-color: var(--pt-pink);
}

.pt-summary {
    background: var(--pt-pink-soft);
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
    font-size: 0.85rem;
}

.pt-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.pt-summary-total {
    font-weight: 800;
    border-top: 1px solid var(--pt-pink);
    padding-top: 6px;
    margin-top: 6px;
}

.pt-form-error {
    color: #dc3545;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 8px 0;
    display: none;
}

.pt-success {
    text-align: center;
    padding: 24px 8px;
}

.pt-success h3 {
    color: var(--pt-pink-dark);
}

.pt-whatsapp-button {
    display: inline-block;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 800;
    margin-top: 12px;
}

/* Product detail gallery */
.pt-card-clickable {
    cursor: pointer;
}

.pt-gallery-main {
    aspect-ratio: 1;
    background: var(--pt-pink-soft);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.pt-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-gallery-main .pt-placeholder {
    font-size: 3rem;
}

.pt-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 10px;
}

.pt-gallery-thumbs img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--pt-pink-soft);
    cursor: pointer;
    flex: 0 0 auto;
}

.pt-gallery-thumbs img.active {
    border-color: var(--pt-pink);
}

#product-modal-description {
    font-size: 0.9rem;
    color: var(--pt-ink);
}

/* Footer */
.pt-footer {
    text-align: center;
    padding: 24px 16px 40px;
    color: var(--pt-muted);
    font-size: 0.85rem;
}

.pt-footer a {
    color: var(--pt-pink-dark);
    font-weight: 700;
    text-decoration: none;
    margin: 0 6px;
}
