/* style.css - Updated Professional Design, Fixed Animations, Alignments */
/* Changed font to Roboto, colors to blue tones, improved layout alignment */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

.admin-body {
    background: #f8f9fa;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #007bff;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffc107;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/*.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(rgba(0,123,255,0.8), rgba(0,123,255,0.8)), url('hero-bg.jpg');
    background-size: cover;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.cta-button {
    padding: 1rem 2rem;
    background: #ffc107;
    color: #007bff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #ffca2c;
}
*/

/* ========================================
   CRICKET PITCH THEME - HERO SECTION
   ======================================== */

/* Cricket Pitch Background */
.hero {
    height: 100vh;
    position: relative;
    background: linear-gradient(rgba(19, 136, 8, 0.8), rgba(19, 136, 8, 0.8)), /* Green overlay */
                url('images/cricket-pitch-bg.jpg') center/cover no-repeat; /* Pitch image */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 50px,
        rgba(255,255,255,0.1) 50px,
        rgba(255,255,255,0.1) 51px
    ); /* Pitch lines */
    pointer-events: none;
}

/* Hero Content - Centered */
.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FF9933, #0066CC); /* Saffron to Blue */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #FF9933; }
    to { text-shadow: 0 0 20px #0066CC; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #FFFFFF;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #138808, #FF9933); /* Green to Saffron */
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(19, 136, 8, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(19, 136, 8, 0.5);
}

/* ========================================
   CRICKET ANIMATION - SCROLL-TRIGGERED
   ======================================== */
.cricket-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cricket-animation.active {
    opacity: 1;
}

/* Bowler (Left Side - Indian Jersey) */
.bowler {
    position: absolute;
    left: -100px;
    top: 40%;
    width: 80px;
    height: 120px;
    background: url('images/indian-jersey.svg') no-repeat center/contain; /* Jersey SVG */
    background-color: #0066CC; /* Blue jersey fallback */
    animation: bowlerRun 4s ease-out forwards;
    z-index: 3;
}

@keyframes bowlerRun {
    0% { left: -100px; transform: scaleX(1); }
    100% { left: 20%; transform: scaleX(1) rotateY(0deg); }
}

/* Ball (Bowled from Bowler) */
.cricket-ball {
    position: absolute;
    left: 20%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: url('images/cricket-ball.svg') no-repeat center/contain; /* Ball SVG */
    background-color: #C8102E; /* Red ball fallback */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,0,0,0.5);
    animation: bowlBall 3s ease-out 1s forwards;
    z-index: 4;
}

@keyframes bowlBall {
    0% { left: 20%; top: 50%; transform: translateY(0) rotate(0deg); }
    100% { left: 70%; top: 40%; transform: translateY(-20px) rotate(720deg); }
}

/* Batsman (Right Side - Indian Jersey) */
.batsman {
    position: absolute;
    right: -100px;
    top: 40%;
    width: 80px;
    height: 120px;
    background: url('images/indian-jersey.svg') no-repeat center/contain; /* Jersey SVG */
    background-color: #0066CC; /* Blue jersey fallback */
    animation: batsmanReady 4s ease-out forwards;
    z-index: 3;
}

@keyframes batsmanReady {
    0% { right: -100px; transform: scaleX(-1); } /* Mirrored */
    100% { right: 20%; transform: scaleX(-1); }
}

/* Bat (Swing) */
.cricket-bat {
    position: absolute;
    right: 15%;
    top: 45%;
    width: 60px;
    height: 10px;
    background: url('images/cricket-bat.svg') no-repeat center/contain; /* Bat SVG */
    background-color: #8B4513; /* Wood fallback */
    transform-origin: right center;
    animation: batSwing 1s ease-out 3s forwards;
    z-index: 5;
}

@keyframes batSwing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-45deg); }
}

/* Hit Ball (Soar Effect) */
.hit-ball {
    position: absolute;
    left: 70%;
    top: 40%;
    width: 15px;
    height: 15px;
    background: url('images/cricket-ball.svg') no-repeat center/contain;
    background-color: #C8102E;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255,0,0,0.7);
    animation: hitBallSoar 2s ease-out 4s forwards;
    z-index: 6;
}

@keyframes hitBallSoar {
    0% { left: 70%; top: 40%; transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { left: 100%; top: -50%; transform: translateY(-100px) rotate(1080deg); opacity: 0; }
}

/* Trail Effect for Ball */
.ball-trail {
    position: absolute;
    left: 20%;
    top: 50%;
    width: 2px;
    height: 2px;
    background: rgba(255,0,0,0.5);
    border-radius: 50%;
    animation: trailFade 3s ease-out 1s forwards;
    z-index: 2;
}

@keyframes trailFade {
    0% { opacity: 0; transform: scale(0); }
    10% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); left: 70%; }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .cricket-animation { display: none; } /* Disable heavy anim on mobile */
    .hero-title { font-size: 2.5rem; }
}

/* General Animations (Keep Existing) */
@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slide-in { animation: slideIn 1s ease-out forwards; }

/* ========================================
   LOGO RESPONSIVE & AUTO-FIT
   ======================================== */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 60px;           /* Max height for desktop */
    width: auto;            /* Maintain aspect ratio */
    max-width: 180px;       /* Max width */
    object-fit: contain;    /* Prevent stretch */
    transition: height 0.3s ease;
}

/* Tablet */
@media (max-width: 992px) {
    .logo-img {
        height: 50px;
        max-width: 150px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .logo-img {
        height: 40px;
        max-width: 120px;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .logo-img {
        height: 35px;
        max-width: 100px;
    }
}

/* Animations - Fixed and made smoother */
@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sprint {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { transform: translateX(50%); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes cricketSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shuttleSoar {
    0% { transform: translateY(100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

.animate-slide-in { animation: slideIn 1s ease-out forwards; }
.animate-fade-in { animation: fadeIn 1.5s ease-out 0.5s forwards; opacity: 0; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-sprint { animation: sprint 8s linear infinite; }
.animate-cricket-spin { animation: cricketSpin 2s linear infinite; }
.animate-shuttle-soar { animation: shuttleSoar 6s ease-in-out infinite; }
.animate-slide-up { animation: slideIn 1s ease-out forwards; transform: translateY(30px); opacity: 0; }
.animate-slide-in-up { animation: slideIn 1s ease-out forwards 0.2s; transform: translateY(30px); opacity: 0; }

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.sports-anim {
    position: absolute;
    opacity: 0.6;
}

.sprint {
    top: 30%;
    width: 80px;
    height: 80px;
    background: linear-gradient(#007bff, #ffc107);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.cricket-spin {
    top: 60%;
    left: 20%;
    width: 40px;
    height: 40px;
    background: #ff0000;
    border-radius: 50%;
}

.shuttle-soar {
    bottom: 0;
    right: 15%;
    width: 30px;
    height: 60px;
    background: linear-gradient(#fff, #007bff);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Sections */
.featured, .products-section, .cart-section, .product-detail, .related-products {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #007bff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

.add-btn, .buy-btn {
    padding: 0.8rem 1.5rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-btn:hover, .buy-btn:hover {
    background: #0056b3;
}

.out-of-stock {
    color: #dc3545;
    font-weight: bold;
}

.product-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.product-img {
    width: 50%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.product-info {
    width: 50%;
}

.product-name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.price-large {
    font-size: 2rem;
    color: #28a745;
    font-weight: 900;
    margin-bottom: 1rem;
}

.description {
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cart-item {
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-cart {
    text-align: center;
    font-size: 1.2rem;
}

.cart-total {
    text-align: right;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover {
    color: #000;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #007bff;
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .product-container {
        flex-direction: column;
    }

    .product-img, .product-info {
        width: 100%;
    }

    .sports-anim {
        display: none;
    }
}

.btn-download { 
    padding: 5px 10px; 
    background: #28a745; 
    color: white; 
    text-decoration: none; 
    border-radius: 3px; 
}