/*
Theme Name: Shopify Style
Theme URI: https://www.webstudio.pk
Author: Malik Safdar Abbas Rid
Author URI: https://www.webstudio.pk
Description: A professional, high-end e-commerce theme inspired by Shopify's best designs.
Version: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shopify-style
*/

/* --- CSS Variables for Global Styling --- */
:root {
    --primary-color: #001f3f;
    --accent-color: #0074d9;
    --text-color: #1a1a1a;
    --light-text: #666666;
    --bg-color: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: #eeeeee;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --card-radius: 12px;
    --btn-radius: 6px;
    --container-width: 1200px;
    --transition-speed: 0.3s;
}

/* --- Base Styles --- */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
img { max-width: 100%; height: auto; display: block; }

/* --- Sticky Header Styling (Premium Gradient) --- */
.sticky-header {
    background: linear-gradient(135deg, #001f3f 0%, #0074d9 100%);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.sticky-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: var(--transition-speed);
}

.logo a:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav a {
    font-weight: 500;
    font-size: 15px;
    opacity: 0.9;
    position: relative;
    transition: opacity var(--transition-speed) ease;
}

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

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width var(--transition-speed) ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icons > div {
    cursor: pointer;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.header-icons > div:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* --- Hamburger Menu (Hidden by default) --- */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* --- Product Grid & Cards (Mockup Style) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
}

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

.product-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.product-price {
    font-size: 16px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 15px;
}

/* --- Buttons (Premium Style) --- */
.btn-shop, .add-to-cart-btn {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-speed);
    font-size: 14px;
}

.btn-shop:hover, .add-to-cart-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

/* --- Footer (Premium Gradient) --- */
footer {
    background: linear-gradient(135deg, #001f3f 0%, #001122 100%);
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-speed);
}

.social-icon:hover { background: var(--accent-color); }

/* --- Animations --- */
.animate-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .main-nav {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #001f3f 0%, #0074d9 100%);
        width: 100%;
        text-align: center;
        transition: left var(--transition-speed) ease;
        padding: 20px 0;
        z-index: 999;
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .main-nav a {
        display: block;
        padding: 10px 0;
        font-size: 16px;
    }

    .header-inner {
        padding: 10px 0;
    }

    .logo a {
        font-size: 20px;
    }

    .header-icons {
        gap: 15px;
    }

    .header-icons > div {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 18px;
    }

    .header-icons {
        gap: 12px;
    }

    .header-icons > div {
        font-size: 14px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-price {
        font-size: 14px;
    }

    .btn-shop, .add-to-cart-btn {
        padding: 10px 15px;
        font-size: 12px;
    }

    footer {
        padding: 40px 0 20px;
    }

    .footer-inner {
        gap: 20px;
    }
}

@media (max-width: 360px) {
    .header-icons {
        gap: 8px;
    }

    .header-icons > div {
        font-size: 12px;
    }

    .logo a {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Boxed Layout for Specific Pages --- */
.content-area {
    padding: 60px 20px;
    background-color: var(--section-bg);
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.site-main {
    max-width: 1000px; /* Central layout box width */
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

/* Adjustments for Shop Grid inside Boxed Layout */
.site-main .product-grid {
    margin-top: 20px;
}

/* Adjustments for Single Product inside Boxed Layout */
.single-product .product-layout {
    padding: 0 !important; /* Remove inline padding as parent has padding */
}

@media (max-width: 768px) {
    .site-main {
        padding: 20px;
    }
    
    .content-area {
        padding: 40px 15px;
    }
    
    .product-layout {
        flex-direction: column;
        gap: 20px !important;
    }
    
    .page-title {
        font-size: 24px;
    }
}

/* --- Cart Page Specific Styles --- */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.cart-table th {
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    padding: 15px;
    color: var(--primary-color);
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cart-total-row {
    font-weight: bold;
    font-size: 20px;
}

.cart-total-row td:first-child {
    text-align: right;
}

.cart-actions {
    text-align: right;
}

.checkout-btn {
    background: var(--accent-color);
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    transition: var(--transition-speed);
}

.checkout-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* --- Page Template Specific Styles --- */

/* Full Screen Layout */
.fullscreen-layout {
    padding: 0 !important;
    display: block !important;
    background-color: transparent !important;
}

.fullscreen-main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.fullscreen-page .entry-header {
    padding: 40px 20px;
    text-align: center;
    background: var(--section-bg);
}

.fullscreen-page .entry-content {
    padding: 40px 20px;
}

/* Central Layout (Boxed) */
.central-layout {
    padding: 60px 20px;
    background-color: var(--section-bg);
    display: flex;
    justify-content: center;
}

.central-main {
    max-width: 1000px !important;
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.central-page .entry-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

@media (max-width: 768px) {
    .central-main {
        padding: 20px;
    }
    
    .central-layout {
        padding: 40px 15px;
    }
}
