/*
Theme Name: My Premium Case
Theme URI: https://example.com
Author: Your Name
Description: A minimal, Apple-inspired WordPress theme for premium phone case e-commerce. Supports iPhone 14, 15, 16, and 17.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-premium-case
*/

:root {
    --primary-bg: #fbfbfd;
    --secondary-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-color: #0071e3;
    --accent-hover: #0077ed;
    --border-color: #d2d2d7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.main-navigation {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: var(--transition);
    opacity: 0.8;
}

.main-navigation a:hover {
    opacity: 1;
}

.cart-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cart-count {
    background: var(--accent-color);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 4px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1d1d1f 0%, #494949 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 14px 28px;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

.cta-button-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 1.5px solid var(--accent-color);
    margin-left: 1rem;
}

.cta-button-secondary:hover {
    background: var(--accent-color);
    color: white;
}

/* Product Grid */
.products-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background: var(--secondary-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 980px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--accent-hover);
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: var(--secondary-bg);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content {
    margin-top: 2rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem 1rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Checkout Section */
.checkout-section {
    padding: 80px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
}

.checkout-form {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--primary-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.order-summary {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.order-summary h3 {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.place-order {
    width: 100%;
    margin-top: 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }

    .main-navigation.active {
        display: flex;
    }

    .checkout-container {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .cta-button-secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }

    .products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet and Medium Screens */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid[style*="repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Desktop - 4 columns for model pages */
@media (min-width: 1025px) {
    .products-grid[style*="repeat(4, 1fr)"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Shop Page Enhancements */
.shop-header {
    background: var(--secondary-bg);
    padding: 60px 20px 40px;
    border-bottom: 1px solid var(--border-color);
}

.shop-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.filter-button {
    padding: 10px 24px;
    background: var(--primary-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 980px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-button:hover {
    background: var(--secondary-bg);
    border-color: var(--accent-color);
}

.filter-button.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.sort-dropdown select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--secondary-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.model-sections {
    margin-bottom: 4rem;
}

.model-section {
    margin-bottom: 5rem;
}

.model-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.model-badge {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.model-badge.iphone-17 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.model-badge.iphone-16 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.model-badge.iphone-15 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.model-badge.iphone-14 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.model-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.model-info p {
    font-size: 0.9375rem;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background: #ff6b6b;
}

.product-badge.sale {
    background: #34c759;
}

.product-card {
    position: relative;
}

/* Model Hero Sections */
.model-hero {
    position: relative;
    overflow: hidden;
}

.model-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Product Card as Link */
a.product-card {
    display: block;
    color: inherit;
}

a.product-card:hover {
    text-decoration: none;
}

a.product-card .product-title {
    color: var(--text-primary);
}

a.product-card .cta-button {
    transition: var(--transition);
}

a.product-card:hover .cta-button {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Features Section */
.features-section {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}

/* Promises Section */
.promise-card {
    transition: var(--transition);
}

.promise-card:hover {
    transform: translateY(-8px);
}

.promise-card div[style*="border-radius: 50%"] {
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.promise-card:hover div[style*="border-radius: 50%"] {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
