/* ==========================================================================
   ADDITIONAL PAGES – Phone Exchange
   Contact (Stores), Sell, Favorites, 404
   ========================================================================== */


/* ==========================================================================
   1. CONTACT / STORES PAGE
   Replicates React Contact.tsx
   ========================================================================== */

.pe-contact-page {
    /* Remove Storefront default content padding */
}

.pe-contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media (min-width: 768px) {
    .pe-contact-container {
        padding: 3rem 2rem 4rem;
    }
}

/* Header */
.pe-contact-header {
    max-width: 42rem; /* max-w-2xl */
    margin-bottom: 2rem;
}

.pe-contact-title {
    font-family: var(--pe-font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: hsl(var(--foreground));
    margin: 0 0 0.75rem;
}

@media (min-width: 768px) {
    .pe-contact-title {
        font-size: 2.25rem;
    }
}

.pe-contact-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    margin: 0;
}

@media (min-width: 768px) {
    .pe-contact-description {
        font-size: 1rem;
    }
}

/* Store cards grid */
.pe-stores-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
    .pe-stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* StoreCard component */
.pe-store-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: box-shadow 0.2s ease;
}

.pe-store-card:hover {
    box-shadow: 0 4px 12px hsla(var(--foreground), 0.08);
}

.pe-store-card__name {
    font-family: var(--pe-font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    margin: 0 0 0.75rem;
}

@media (min-width: 768px) {
    .pe-store-card__name {
        font-size: 1rem;
    }
}

.pe-store-card__detail {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
}

.pe-store-card__detail + .pe-store-card__detail {
    margin-top: 0.5rem;
}

.pe-store-card__detail svg {
    color: hsl(var(--accent));
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
}

.pe-store-card__detail a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s;
}

.pe-store-card__detail a:hover {
    color: hsl(var(--foreground));
}

.pe-store-card__map-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--accent));
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.pe-store-card__map-link:hover {
    text-decoration: underline;
    color: hsl(var(--accent));
}

/* General inquiries section */
.pe-contact-inquiries {
    background: linear-gradient(135deg, hsla(var(--accent), 0.06) 0%, hsla(var(--accent), 0.02) 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .pe-contact-inquiries {
        padding: 2.5rem;
    }
}

.pe-contact-inquiries__title {
    font-family: var(--pe-font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: hsl(var(--foreground));
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .pe-contact-inquiries__title {
        font-size: 1.5rem;
    }
}

.pe-contact-inquiries__text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    max-width: 32rem;
    margin: 0 0 1.5rem;
}

.pe-contact-inquiries__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pe-contact-inquiries__link-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.pe-contact-inquiries__link-row svg {
    color: hsl(var(--accent));
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pe-contact-inquiries__link-row a {
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.2s;
}

.pe-contact-inquiries__link-row a:hover {
    color: hsl(var(--accent));
}


/* ==========================================================================
   2. SELL PAGE
   Replicates React Sell.tsx
   ========================================================================== */

.pe-sell-page {
    display: flex;
    flex-direction: column;
}

.pe-sell-iframe {
    width: 100%;
    border: 0;
    height: calc(100vh - 3.5rem);
    display: block;
}


/* ==========================================================================
   3. FAVORITES PAGE
   Replicates React Favorites.tsx (empty state)
   ========================================================================== */

.pe-favorites-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media (min-width: 768px) {
    .pe-favorites-container {
        padding: 3.5rem 2rem 4rem;
    }
}

.pe-favorites-title {
    font-family: var(--pe-font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: hsl(var(--foreground));
    margin: 0 0 2rem;
}

@media (min-width: 768px) {
    .pe-favorites-title {
        font-size: 1.875rem; /* text-3xl */
    }
}

.pe-favorites-empty {
    text-align: center;
    padding: 4rem 0;
}

.pe-favorites-empty__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.pe-favorites-empty__icon svg {
    width: 64px;
    height: 64px;
    color: hsla(var(--muted-foreground), 0.3);
}

.pe-favorites-empty__heading {
    font-family: var(--pe-font-heading);
    font-weight: 600;
    font-size: 1.125rem;
    color: hsl(var(--foreground));
    margin: 0 0 0.5rem;
}

.pe-favorites-empty__text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    max-width: 28rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.pe-favorites-empty__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: var(--pe-font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.pe-favorites-empty__cta:hover {
    opacity: 0.9;
    color: hsl(var(--primary-foreground));
}


/* ==========================================================================
   4. 404 PAGE
   ========================================================================== */

.pe-404-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.pe-404-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    width: 100%;
}

.pe-404-content {
    text-align: center;
    max-width: 32rem;
    margin: 0 auto;
}

.pe-404-code {
    font-family: var(--pe-font-heading);
    font-weight: 800;
    font-size: 5rem;
    color: hsla(var(--muted-foreground), 0.2);
    margin: 0 0 0.5rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .pe-404-code {
        font-size: 8rem;
    }
}

.pe-404-title {
    font-family: var(--pe-font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: hsl(var(--foreground));
    margin: 0 0 0.75rem;
}

@media (min-width: 768px) {
    .pe-404-title {
        font-size: 1.875rem;
    }
}

.pe-404-text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    margin: 0 0 2rem;
}

.pe-404-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 640px) {
    .pe-404-actions {
        flex-direction: row;
    }
}

.pe-404-actions .pe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-family: var(--pe-font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pe-404-actions .pe-btn--primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.pe-404-actions .pe-btn--primary:hover {
    opacity: 0.9;
    color: hsl(var(--primary-foreground));
}

.pe-404-actions .pe-btn--outline {
    background: transparent;
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.pe-404-actions .pe-btn--outline:hover {
    background: hsl(var(--secondary));
}


/* ==========================================================================
   5. STOREFRONT OVERRIDES FOR THESE PAGES
   ========================================================================== */

/* Remove Storefront default page padding/margins on our custom templates */
.pe-contact-page .site-content .col-full,
.pe-sell-page .site-content .col-full,
.pe-favorites-page .site-content .col-full,
.pe-404-page .site-content .col-full {
    max-width: 100%;
    padding: 0;
}

/* Storefront wraps pages in .hentry with large bottom margin */
body.page-template-page-contact .hentry,
body.page-template-page-sell .hentry,
body.page-template-page-favorites .hentry {
    margin-bottom: 0 !important;
}

/* Remove Storefront's default page header if it still appears */
body.page-template-page-contact .entry-header,
body.page-template-page-sell .entry-header,
body.page-template-page-favorites .entry-header {
    display: none !important;
}
