/* public_html/fontstore/assets/style.css - REFINED PREMIUM VERSION */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-sec: #666666;
    --accent: #2563eb;
    /* Royal Blue */
    --accent-hover: #1d4ed8;
    --border: #eeeeee;
    --card-bg: #f9fafb;
    --header-h: 70px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
    padding-top: var(--header-height);
    line-height: 1.5;
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1rem;
    color: var(--text-sec);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* UTILITY */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--text-main);
    color: white;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
}

.btn-full {
    width: 100%;
}

/* HEADER */
.main-header {
    height: var(--header-h);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.nav-links a {
    margin-left: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-sec);
}

.nav-links a:hover {
    color: var(--text-main);
}

.cart-icon-wrap {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.cart-icon-wrap:hover {
    background: #f0f0f0;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* HERO */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(50% 50% at 50% 50%, #f9fafb 0%, #ffffff 100%);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* PRODUCT GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-img-box {
    aspect-ratio: 1/1;
    background: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card:hover .card-img-box img:first-child {
    transform: scale(1.05);
}

.card-details {
    padding: 1.5rem 1rem;
    text-align: center;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    /* Prevent text touching edges */
}

.card-price {
    font-weight: 700;
    color: var(--text-main);
}

/* PRODUCT DETAIL */
/* Fix Header Overlap */
.pdp-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 0;
    /* Keeps vertical padding */
    align-items: start;
    margin-top: 2rem;
    /* Add specific margin to clear header comfortably if needed */
}

.pdp-img {
    background: #f3f4f6;
    border-radius: 16px;
    aspect-ratio: 1/1;
    /* Enforce Square to match Admin view */
    position: relative;
    /* Context for absolute layers */
    overflow: hidden;
    /* Remove flex centering as layers use absolute positioning */
    width: 100%;
}

/* Base styling only for images that fall back to default flow - but ours are hardcoded inline */
.pdp-img img {
    /* Styles are handled inline by product.php for precise positioning */
    /* But helpful reset: */
    display: block;
}

.pdp-content h1 {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    line-height: 1.3;
    margin-bottom: 1rem;
}

.pdp-price {
    font-size: 1.75rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.size-opt {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.size-opt:hover,
.size-opt.active {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

/* DRAWER */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 2000;
}

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

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2010;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.drawer-overlay.open .drawer {
    transform: translateX(0);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 8px;
}

/* CHECKOUT */
.checkout-page {
    max-width: 800px;
    margin: 4rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--text-sec);
}

.form-control {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: 0 0 0 1px var(--text-main);
}

@media(max-width: 768px) {
    .pdp-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .drawer {
        width: 100%;
    }
}